Open a market position or place a pending order
curl --request POST \
--url https://gateway.amana.io/trading/positions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"symbol": "<string>",
"amount": 1,
"sl": 1,
"tp": 1,
"price": 1,
"slAmount": 123,
"tpAmount": 123,
"comment": "<string>"
}
'import requests
url = "https://gateway.amana.io/trading/positions"
payload = {
"symbol": "<string>",
"amount": 1,
"sl": 1,
"tp": 1,
"price": 1,
"slAmount": 123,
"tpAmount": 123,
"comment": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
symbol: '<string>',
amount: 1,
sl: 1,
tp: 1,
price: 1,
slAmount: 123,
tpAmount: 123,
comment: '<string>'
})
};
fetch('https://gateway.amana.io/trading/positions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://gateway.amana.io/trading/positions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'symbol' => '<string>',
'amount' => 1,
'sl' => 1,
'tp' => 1,
'price' => 1,
'slAmount' => 123,
'tpAmount' => 123,
'comment' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://gateway.amana.io/trading/positions"
payload := strings.NewReader("{\n \"symbol\": \"<string>\",\n \"amount\": 1,\n \"sl\": 1,\n \"tp\": 1,\n \"price\": 1,\n \"slAmount\": 123,\n \"tpAmount\": 123,\n \"comment\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://gateway.amana.io/trading/positions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"symbol\": \"<string>\",\n \"amount\": 1,\n \"sl\": 1,\n \"tp\": 1,\n \"price\": 1,\n \"slAmount\": 123,\n \"tpAmount\": 123,\n \"comment\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.amana.io/trading/positions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"symbol\": \"<string>\",\n \"amount\": 1,\n \"sl\": 1,\n \"tp\": 1,\n \"price\": 1,\n \"slAmount\": 123,\n \"tpAmount\": 123,\n \"comment\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"orderId": "<string>",
"err": "<string>",
"message": "<string>"
}{
"success": true,
"orderId": "<string>",
"err": "<string>",
"message": "<string>"
}{}trading
Open a market position or place a pending order
Opens a market position or places a pending limit/stop order. If price is omitted, the order executes at market price immediately. If price is set, a pending order is created that triggers when the market reaches that price.
POST
/
trading
/
positions
Open a market position or place a pending order
curl --request POST \
--url https://gateway.amana.io/trading/positions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"symbol": "<string>",
"amount": 1,
"sl": 1,
"tp": 1,
"price": 1,
"slAmount": 123,
"tpAmount": 123,
"comment": "<string>"
}
'import requests
url = "https://gateway.amana.io/trading/positions"
payload = {
"symbol": "<string>",
"amount": 1,
"sl": 1,
"tp": 1,
"price": 1,
"slAmount": 123,
"tpAmount": 123,
"comment": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
symbol: '<string>',
amount: 1,
sl: 1,
tp: 1,
price: 1,
slAmount: 123,
tpAmount: 123,
comment: '<string>'
})
};
fetch('https://gateway.amana.io/trading/positions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://gateway.amana.io/trading/positions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'symbol' => '<string>',
'amount' => 1,
'sl' => 1,
'tp' => 1,
'price' => 1,
'slAmount' => 123,
'tpAmount' => 123,
'comment' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://gateway.amana.io/trading/positions"
payload := strings.NewReader("{\n \"symbol\": \"<string>\",\n \"amount\": 1,\n \"sl\": 1,\n \"tp\": 1,\n \"price\": 1,\n \"slAmount\": 123,\n \"tpAmount\": 123,\n \"comment\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://gateway.amana.io/trading/positions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"symbol\": \"<string>\",\n \"amount\": 1,\n \"sl\": 1,\n \"tp\": 1,\n \"price\": 1,\n \"slAmount\": 123,\n \"tpAmount\": 123,\n \"comment\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.amana.io/trading/positions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"symbol\": \"<string>\",\n \"amount\": 1,\n \"sl\": 1,\n \"tp\": 1,\n \"price\": 1,\n \"slAmount\": 123,\n \"tpAmount\": 123,\n \"comment\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"orderId": "<string>",
"err": "<string>",
"message": "<string>"
}{
"success": true,
"orderId": "<string>",
"err": "<string>",
"message": "<string>"
}{}Body
application/json
Last modified on October 7, 2026
