List outstanding trading positions
curl --request GET \
--url https://api.anchorage-staging.com/v2/trading/positions \
--header 'Api-Access-Key: <api-key>'import requests
url = "https://api.anchorage-staging.com/v2/trading/positions"
headers = {"Api-Access-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'Api-Access-Key': '<api-key>'}};
fetch('https://api.anchorage-staging.com/v2/trading/positions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"positionAmount": {
"assetType": "BTC",
"quantity": "30.54447726"
}
},
{
"positionAmount": {
"assetType": "ETH",
"quantity": "8391"
}
},
{
"positionAmount": {
"assetType": "USD",
"quantity": "-100276.38"
}
}
]
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}Permissions required: Execute trades or Read trade activity
Get the list of outstanding trading positions.
GET
/
trading
/
positions
List outstanding trading positions
curl --request GET \
--url https://api.anchorage-staging.com/v2/trading/positions \
--header 'Api-Access-Key: <api-key>'import requests
url = "https://api.anchorage-staging.com/v2/trading/positions"
headers = {"Api-Access-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'Api-Access-Key': '<api-key>'}};
fetch('https://api.anchorage-staging.com/v2/trading/positions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"positionAmount": {
"assetType": "BTC",
"quantity": "30.54447726"
}
},
{
"positionAmount": {
"assetType": "ETH",
"quantity": "8391"
}
},
{
"positionAmount": {
"assetType": "USD",
"quantity": "-100276.38"
}
}
]
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}{
"errorType": "InternalError",
"message": "Missing required field 'amount'."
}Was this page helpful?