Closed positions, newest first, with funding and, when the whole position closed, the gross PnL worked out from the average prices. Fees are in orderHistory.
Query parameters
Name
Type
Description
traderIdrequired
string
A dYdX address (dydx1...)
cursor
string
The nextCursor of the previous answer; leave it out for the first page
rows
intdefault 20
Rows per page1 to 100
Response fields, in data
Field
Type
Description
positions[]always
array
positions[].positionId
string
positions[].symbolalways
string
positions[].side
LONG | SHORT
positions[].status
string
positions[].marginMode
ISOLATED | CROSS
positions[].leverage
number
positions[].roi
number
positions[].entryPrice
number
positions[].closePrice
number
positions[].openedAtalways
number
When the position opened, in Unix milliseconds
positions[].closedAt
number
When the position closed, in Unix milliseconds
positions[].updatedAtalways
number
Last change, in Unix milliseconds
positions[].openedVolume
number
positions[].closedVolume
number
positions[].maxOpenInterest
number
positions[].grossPnl
number
positions[].fundingPnl
number
positions[].tradingFee
number
positions[].liquidationFee
number
positions[].netPnl
number
positions[].pnlCurrency
string
positions[].sourceDetails.subaccountNumber
only dYdX
nextCursor
string
Send it back as cursor, with the same query, to read the next page; absent on the last page
Deposits, withdrawals and transfers to or from other addresses, newest first. Moves between the address's own subaccounts are left out, so a page can hold fewer rows than asked.
Query parameters
Name
Type
Description
traderIdrequired
string
A dYdX address (dydx1...)
cursor
string
The nextCursor of the previous answer; leave it out for the first page
rows
intdefault 20
Rows per page1 to 100
Response fields, in data
Field
Type
Description
transfers[]always
array
transfers[].timealways
number
In Unix milliseconds
transfers[].asset
string
transfers[].amountalways
number
transfers[].typealways
deposit | withdraw | transfer | vaultDeposit | vaultWithdraw | commission | other
deposit and withdraw move the owner's money into or out of the account; transfer, to or from another address; vaultDeposit and vaultWithdraw, into or out of a vault; commission is a vault leader's share; other is a kind none of these fits, named in sourceDetails.type
transfers[].sourceDetails.type
only dYdX
transfers[].counterparty
string
transfers[].txHash
string
nextCursor
string
Send it back as cursor, with the same query, to read the next page; absent on the last page
Filled perpetual orders, newest first, built from the latest fills (up to 1000): average price, quantity and fees. The oldest order may be missing fills read past the limit. dYdX offers no way to page further back.
Query parameters
Name
Type
Description
traderIdrequired
string
A dYdX address (dydx1...)
rows
intdefault 500
Latest fills to read1 to 1000
Response fields, in data
Field
Type
Description
orders[]always
array
orders[].symbolalways
string
orders[].sidealways
string
orders[].positionSide
string
BOTH in one-way mode; LONG or SHORT in hedge mode
orders[].price
number
orders[].quantity
number
orders[].quoteQuantity
number
orders[].createdAt
number
When the order was placed, in Unix milliseconds
orders[].updatedAtalways
number
Last change, in Unix milliseconds
orders[].sourceDetails.fills
only dYdX
orders[].orderType
string
For example MARKET or LIMIT
orders[].orderId
string
orders[].tradingFee
number
Fees paid, in sourceDetails.feeToken; negative is a rebate