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

NameTypeDescription

address*

String

User's dydx address.

derivativeId

String

Refer to the Derivative Id page for details.

subAccountNumber*

String

Number of the sub account.

https://api.expand.network/derivative/getorders?derivativeId=1000&address=dydx13uxwm6gyyggdz92z47h0h2xdfqdfa0wrtykp2d&subAccountNumber=0

/getorder

Users can fetch details for a specific order using the specified order id.

GET https://api.expand.network/derivative/getorder

Query Parameters

NameTypeDescription

orderId*

String

Order Id to fetch details of.

derivativeId

String

Refer to the Derivative Id page for details.

https://api.expand.network/derivative/getorder?derivativeId=1000&orderId=5724e441-654f-5dc6-ac02-e8e4a7ecda2e

/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

NameTypeDescription

address*

String

User's dydx address.

derivativeId

String

Refer to the Derivative Id page for details.

subAccountNumber*

String

Number of the sub account.

https://api.expand.network/derivative/getfills?derivativeId=1000&address=dydx13uxwm6gyyggdz92z47h0h2xdfqdfa0wrtykp2d&subAccountNumber=0

/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

NameTypeDescription

address*

String

User's dydx address.

derivativeId

String

Refer to the Derivative Id page for details.

subAccountNumber*

String

Number of the sub account.

https://api.expand.network/derivative/getassets?derivativeId=1000&address=dydx13uxwm6gyyggdz92z47h0h2xdfqdfa0wrtykp2d&subAccountNumber=0

/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

NameTypeDescription

address*

String

User's dydx address.

derivativeId

String

Refer to the Derivative Id page for details.

subAccountNumber*

String

Number of the sub account.

https://api.expand.network/derivative/gethistoricalpnl?derivativeId=1000&address=dydx13uxwm6gyyggdz92z47h0h2xdfqdfa0wrtykp2d&subAccountNumber=0

/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

NameTypeDescription

address*

String

User's dydx address.

derivativeId

String

Refer to the Derivative Id page for details.

subAccountNumber*

String

Number of the sub account.

https://api.expand.network/derivative/getperpetualpositions?derivativeId=1000&address=dydx13uxwm6gyyggdz92z47h0h2xdfqdfa0wrtykp2d&subAccountNumber=0

/getsubaccounts

Users can fetch the details of a sub-account corresponding to the specified address.

GET https://api.expand.network/derivative/getsubaccounts

Query Parameters

NameTypeDescription

address*

String

User's dydx address.

derivativeId

String

Refer to the Derivative Id page for details.

https://api.expand.network/derivative/getsubaccounts?derivativeId=1000&address=dydx13uxwm6gyyggdz92z47h0h2xdfqdfa0wrtykp2d

/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

NameTypeDescription

address*

String

User's dydx address.

derivativeId

String

Refer to the Derivative Id page for details.

subAccountNumber*

String

Number of the sub account.

https://api.expand.network/derivative/gettransfers?derivativeId=1000&address=dydx13uxwm6gyyggdz92z47h0h2xdfqdfa0wrtykp2d&subAccountNumber=0

Last updated