curl --request POST \
--url 'https://gateway.amana.io/trading/positions' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"symbol": "<string>",
"side": "buy",
"type": "unit",
"amount": 123.45,
"sl": 123.45,
"tp": 123.45,
"price": 123.45,
"slAmount": 123.45,
"tpAmount": 123.45,
"comment": "<string>"
}'
import requests
url = "https://gateway.amana.io/trading/positions"
headers = {"Authorization": "Bearer <token>", "Content-Type": "application/json"}
payload = {
"symbol": "<string>",
"side": "buy",
"type": "unit",
"amount": 123.45,
"sl": 123.45,
"tp": 123.45,
"price": 123.45,
"slAmount": 123.45,
"tpAmount": 123.45,
"comment": "<string>"
}
response = requests.request("POST", url, json=payload, headers=headers)
print(response.json())
const response = await fetch('https://gateway.amana.io/trading/positions', {
method: 'POST',
headers: {"Authorization": "Bearer <token>", "Content-Type": "application/json"},
body: JSON.stringify({"symbol": "<string>", "side": "buy", "type": "unit", "amount": 123.45, "sl": 123.45, "tp": 123.45, "price": 123.45, "slAmount": 123.45, "tpAmount": 123.45, "comment": "<string>"}),
});
console.log(await response.json());
{
"success": true,
"orderId": "<string>",
"err": "<string>",
"message": "<string>"
}
{
"success": true,
"orderId": "<string>",
"err": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{}
Trading
Place an order
Open a position at market price, or place a pending limit or stop order by setting a price.
POST
/
trading
/
positions
curl --request POST \
--url 'https://gateway.amana.io/trading/positions' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"symbol": "<string>",
"side": "buy",
"type": "unit",
"amount": 123.45,
"sl": 123.45,
"tp": 123.45,
"price": 123.45,
"slAmount": 123.45,
"tpAmount": 123.45,
"comment": "<string>"
}'
import requests
url = "https://gateway.amana.io/trading/positions"
headers = {"Authorization": "Bearer <token>", "Content-Type": "application/json"}
payload = {
"symbol": "<string>",
"side": "buy",
"type": "unit",
"amount": 123.45,
"sl": 123.45,
"tp": 123.45,
"price": 123.45,
"slAmount": 123.45,
"tpAmount": 123.45,
"comment": "<string>"
}
response = requests.request("POST", url, json=payload, headers=headers)
print(response.json())
const response = await fetch('https://gateway.amana.io/trading/positions', {
method: 'POST',
headers: {"Authorization": "Bearer <token>", "Content-Type": "application/json"},
body: JSON.stringify({"symbol": "<string>", "side": "buy", "type": "unit", "amount": 123.45, "sl": 123.45, "tp": 123.45, "price": 123.45, "slAmount": 123.45, "tpAmount": 123.45, "comment": "<string>"}),
});
console.log(await response.json());
{
"success": true,
"orderId": "<string>",
"err": "<string>",
"message": "<string>"
}
{
"success": true,
"orderId": "<string>",
"err": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{}
Body
Content type:application/json
string
required
Trading symbol, for example XAUUSD, EURUSD, or AAPL.
enum<string>
required
Trade direction. Use ‘buy’ to go long, ‘sell’ to go short.Available options:
buy, sellenum<string>
required
Unit of the
amount field. Use ‘unit’ when amount is expressed in instrument units (e.g. 0.1 lots). Use ‘amount’ when expressed in money (e.g. 1000 USD).Available options: unit, amountnumber
required
Size of the trade in the units specified by
type.Minimum: 0number
Optional stop loss price. The position will automatically close if the market reaches this level.Minimum:
0number
Optional take profit price. The position will automatically close in profit if the market reaches this level.Minimum:
0number
Optional limit/stop order trigger price. Omit for a market order.Minimum:
0number
Stop Loss amount (for amount type)
number
Take Profit amount (for amount type)
string
Optional comment or note for the order.
Response
200 Success.
boolean
string
string
string
Possible Errors
| Error | Possible cause | What to do |
|---|---|---|
| 400 | Invalid or missing field, amount outside limits | Check the request against the schema and the instrument’s size limits. |
| 401 | Token missing or expired | Log in again or use the refresh token. |
| 403 | IP not whitelisted, or account restricted | Confirm your IP is whitelisted; otherwise contact Amana. |
| 409 / 422 | Market closed, insufficient balance or margin | Check trading hours and balance, then retry. |
| 429 / 5xx | Rate limit, or temporary issue on our side | Retry with backoff; contact support if it persists. |
curl --request POST \
--url 'https://gateway.amana.io/trading/positions' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"symbol": "<string>",
"side": "buy",
"type": "unit",
"amount": 123.45,
"sl": 123.45,
"tp": 123.45,
"price": 123.45,
"slAmount": 123.45,
"tpAmount": 123.45,
"comment": "<string>"
}'
import requests
url = "https://gateway.amana.io/trading/positions"
headers = {"Authorization": "Bearer <token>", "Content-Type": "application/json"}
payload = {
"symbol": "<string>",
"side": "buy",
"type": "unit",
"amount": 123.45,
"sl": 123.45,
"tp": 123.45,
"price": 123.45,
"slAmount": 123.45,
"tpAmount": 123.45,
"comment": "<string>"
}
response = requests.request("POST", url, json=payload, headers=headers)
print(response.json())
const response = await fetch('https://gateway.amana.io/trading/positions', {
method: 'POST',
headers: {"Authorization": "Bearer <token>", "Content-Type": "application/json"},
body: JSON.stringify({"symbol": "<string>", "side": "buy", "type": "unit", "amount": 123.45, "sl": 123.45, "tp": 123.45, "price": 123.45, "slAmount": 123.45, "tpAmount": 123.45, "comment": "<string>"}),
});
console.log(await response.json());
{
"success": true,
"orderId": "<string>",
"err": "<string>",
"message": "<string>"
}
{
"success": true,
"orderId": "<string>",
"err": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{}
Last modified on October 8, 2026
