def place_order(self, symbol,
direction, amount):
headers = {
"Authorization": f"Bearer {self.token}",
"Content-Type": "application/json"
}
payload = {
"AccountKey": self.account_key,
"AssetType": "FxSpot",
"Amount": amount,
"BuySell": direction,
"OrderType": "Market",
"Uic": symbol,
"ManualOrder": False,
"ExternalReference": "AutoBot_001"
}
response = requests.post(
f"{self.base}/trade/v2/orders",
json=payload,
headers=headers
)
return response.json()