Get an account's positions
curl --request GET \
--url https://api.dev.leneutre.trade/v1/accounts/{address}const options = {method: 'GET'};
fetch('https://api.dev.leneutre.trade/v1/accounts/{address}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dev.leneutre.trade/v1/accounts/{address}"
response = requests.get(url)
print(response.text){
"venues": [
{
"venue": "<string>",
"result": {
"address": "<string>",
"equityUsd": 123,
"positions": [
{
"market": "<string>",
"side": "long",
"size": 123,
"notionalUsd": 123,
"entryPrice": 123,
"unrealizedPnlUsd": 123,
"accruedCarryUsd": 123,
"margin": "cross",
"liquidationPrice": 123,
"buffer": 123
}
],
"crossBuffer": 123,
"riskSource": "venue",
"withdrawableUsd": 123,
"withdrawalReserve": {
"positionValueShare": 0.1,
"positionValueUsd": 123,
"initialMarginUsd": 123
}
},
"error": "<string>"
}
],
"pairs": [
{
"asset": "<string>",
"longSize": 123,
"shortSize": 123,
"netSize": 123,
"hedged": true,
"legs": [
{}
],
"unhedged": {
"side": "long",
"size": 123,
"venues": [
"<string>"
]
}
}
]
}{
"error": "<string>",
"detail": "<string>"
}{
"error": "Too many requests: wait, then try again."
}{
"error": "<string>",
"detail": "<string>"
}Markets and accounts
Get an account's positions
An address’s positions on every venue that exposes them publicly, grouped into pairs by asset: hedged within 2%, or the side and size left uncovered. A venue that can’t be read says why, or gives its error.
GET
/
v1
/
accounts
/
{address}
Get an account's positions
curl --request GET \
--url https://api.dev.leneutre.trade/v1/accounts/{address}const options = {method: 'GET'};
fetch('https://api.dev.leneutre.trade/v1/accounts/{address}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dev.leneutre.trade/v1/accounts/{address}"
response = requests.get(url)
print(response.text){
"venues": [
{
"venue": "<string>",
"result": {
"address": "<string>",
"equityUsd": 123,
"positions": [
{
"market": "<string>",
"side": "long",
"size": 123,
"notionalUsd": 123,
"entryPrice": 123,
"unrealizedPnlUsd": 123,
"accruedCarryUsd": 123,
"margin": "cross",
"liquidationPrice": 123,
"buffer": 123
}
],
"crossBuffer": 123,
"riskSource": "venue",
"withdrawableUsd": 123,
"withdrawalReserve": {
"positionValueShare": 0.1,
"positionValueUsd": 123,
"initialMarginUsd": 123
}
},
"error": "<string>"
}
],
"pairs": [
{
"asset": "<string>",
"longSize": 123,
"shortSize": 123,
"netSize": 123,
"hedged": true,
"legs": [
{}
],
"unhedged": {
"side": "long",
"size": 123,
"venues": [
"<string>"
]
}
}
]
}{
"error": "<string>",
"detail": "<string>"
}{
"error": "Too many requests: wait, then try again."
}{
"error": "<string>",
"detail": "<string>"
}