dYdX V4
Currently on testnet only. Additional Functionalities available in expand.network SDK: onboarding user, place order, transfer, deposit, and cancel order.
/getorders
Users can fetch details for all orders corresponding to the specified address and the specified sub-account number.
GET https://api.expand.network/derivative/getorders
Query Parameters
address*
String
User's dydx address.
subAccountNumber*
String
Number of the sub account.
https://api.expand.network/derivative/getorders?derivativeId=1000&address=dydx13uxwm6gyyggdz92z47h0h2xdfqdfa0wrtykp2d&subAccountNumber=0{
"status": 200,
"msg": "success",
"data": {
"orders": [
{
"id": "5724e441-654f-5dc6-ac02-e8e4a7ecda2e",
"subaccountId": "8845f855-4943-5f72-9ad2-d0a2a416c5bd",
"clientId": "3711471933",
"clobPairId": "1",
"side": "SELL",
"size": "0.01",
"totalFilled": "0",
"price": "2600",
"type": "LIMIT",
"status": "CANCELED",
"timeInForce": "GTT",
"reduceOnly": false,
"orderFlags": "64",
"goodTilBlockTime": "2024-01-10T10:42:45.000Z",
"createdAtHeight": "4993716",
"clientMetadata": "0",
"updatedAt": "2024-01-10T10:42:45.385Z",
"updatedAtHeight": "4993921",
"postOnly": true,
"ticker": "ETH-USD"
},
{
"id": "ff494eb3-d74e-5852-8aea-1ddabc4d9a37",
"subaccountId": "8845f855-4943-5f72-9ad2-d0a2a416c5bd",
"clientId": "1594632561",
"clobPairId": "1",
"side": "BUY",
"size": "0.01",
"totalFilled": "0.01",
"price": "2600",
"type": "LIMIT",
"status": "FILLED",
"timeInForce": "GTT",
"reduceOnly": false,
"orderFlags": "64",
"goodTilBlockTime": "2024-01-10T10:31:42.000Z",
"createdAtHeight": "4993244",
"clientMetadata": "0",
"updatedAt": "2024-01-10T10:26:43.386Z",
"updatedAtHeight": "4993245",
"postOnly": false,
"ticker": "ETH-USD"
}
]
}
}/getorder
Users can fetch details for a specific order using the specified order id.
GET https://api.expand.network/derivative/getorder
Query Parameters
orderId*
String
Order Id to fetch details of.
/getfills
Users can fetch the fill details of the order corresponding to the specified address and the specified sub-account number.
GET https://api.expand.network/derivative/getfills
Query Parameters
address*
String
User's dydx address.
subAccountNumber*
String
Number of the sub account.
/getassets
Users can fetch a list of their assets deposited in dYdX corresponding to the specified address and the specified sub-account number.
GET https://api.expand.network/derivative/getassets
Query Parameters
address*
String
User's dydx address.
subAccountNumber*
String
Number of the sub account.
/gethistoricalpnl
Users can fetch the historical profit and loss corresponding to the specified address and the specified sub-account number.
GET https://api.expand.network/derivative/gethistoricalpnl
Query Parameters
address*
String
User's dydx address.
subAccountNumber*
String
Number of the sub account.
/getperpetualpositions
Users can fetch the position corresponding to the specified address and the specified sub-account number.
GET https://api.expand.network/derivative/getperpetualpositions
Query Parameters
address*
String
User's dydx address.
subAccountNumber*
String
Number of the sub account.
/getsubaccounts
Users can fetch the details of a sub-account corresponding to the specified address.
GET https://api.expand.network/derivative/getsubaccounts
Query Parameters
address*
String
User's dydx address.
/gettransfers
Users can fetch the details of the transfer transaction corresponding to the specified address and the specified sub-account number.
GET https://api.expand.network/derivative/gettransfers
Query Parameters
address*
String
User's dydx address.
subAccountNumber*
String
Number of the sub account.
Last updated

