GET /v4/trades/perpetualMarket/{market}
Auth X-Hub-Key from API_HUB_KEYExecute
GET /run/dydx/v4/trades/perpetualMarket/{market}Cache cached 1s, never served stale past that windowCost free · weight 0 · standard rate classSource billing freeRecent public trades for one perpetual market, newest first, with side, price, size and block height.
Parameters
| name | in | type | description | |
|---|---|---|---|---|
market | path | str | required | Perpetual market ticker. example: BTC-USD |
limit | query | int | optional | Maximum number of trades to return. example: 2 |
startingBeforeOrAtHeight | query | int | optional | Block height to start retrieving trades from. example: 99999999 |
Response
type: object
data key: trades
pagination: none
sample: {
"trades": "array[2]"
}
Safe request
Reads the credential from API_HUB_KEY; it never appears in the URL.
curl -sH "X-Hub-Key: $API_HUB_KEY" "https://openapihub.dev/run/dydx/v4/trades/perpetualMarket/BTC-USD?limit=2&startingBeforeOrAtHeight=99999999"