Get Open Trades

get
Get all open trades for a user

https://api.futureswap.gg/prod/api/v1/exchange/0x8fA7490cedB7207281a5ceabee12773046dE664E/trades/USER_ADDRESS
This endpoint fetches all open trades for a given user address
Request
Response
Request
Path Parameters
USER_ADDRESS
required
string
Specific user address
Response
200: OK
Retreived trades successfully
{
"trades": [
{
"type": "long",
"tradeId": "0xd84fe8be7e19804b0fb8b0dbf456d9949d461d20e89fdfc9c7981ed0281bd601",
"isOpen": true,
"isLiquidated": false,
"leverage": "9588428615649759723",
"assetTokenBorrowed": "1147449012816362330",
"tradeValue": "536952002476386544514",
"openPrice": "488039114370323978513",
"liquidationPrice": "452819796838444928133",
"collateral": "56000000000000000000",
"creationTime": 1603506472,
"totalReturn": "32952002476386544712",
"profitLoss": {
"isProfitable": false,
"value": "-23047997523613455288",
"fundingPL": "0",
"percent": "-411571384350240273"
},
"hasActiveChildAction": false,
"state": {
"status": "published"
}
}
]
}
404: Not Found
No trades found
{ "message": "No trades found"}

‚Äč