List markets
GET https://rest.haasapi.com/v1/markets
Returns the markets available for trading. Filtered by exchange, one request returns the whole exchange. Unfiltered, the full universe pages by cursor.
Requires the read scope.
Query parameters
Section titled “Query parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
exchange |
string | no | Exchange code, case-insensitive (e.g. BINANCE). Unknown codes return 404. |
limit |
integer | no | Page size, 1–3000. Defaults to 3000. |
cursor |
string | no | Opaque cursor from a previous response’s next_cursor. |
Example request
Section titled “Example request”curl "https://rest.haasapi.com/v1/markets?exchange=BINANCE&limit=500" \ -H "Authorization: Bearer hk_live_YOUR_KEY"Response
Section titled “Response”200 OK. Returns a MarketsPage.
{ "data": [ { "market_tag": "BINANCE_BTC_USDT", "exchange": "BINANCE", "base": "BTC", "quote": "USDT", "market_type": "spot", "price_step": "0.01", "price_decimals": 2, "amount_step": "0.00001", "amount_decimals": 5, "maker_fee": "0.1", "taker_fee": "0.1", "min_order_amount": "0.00001", "min_order_value": "5", "max_order_amount": "9000", "max_order_value": "0", "is_open": true, "contract": null }, { "market_tag": "BYBITCOIN_BTC_USD_PERPETUAL", "exchange": "BYBITCOIN", "base": "BTC", "quote": "USD", "market_type": "futures", "price_step": "0.5", "price_decimals": 1, "amount_step": "1", "amount_decimals": 0, "maker_fee": "0.02", "taker_fee": "0.055", "min_order_amount": "1", "min_order_value": "0", "max_order_amount": "0", "max_order_value": "0", "is_open": true, "contract": { "name": "PERPETUAL", "type": "inverse", "margin_currency": "BTC", "display_name": "BTC/USD Perpetual", "contract_value": "1", "contract_value_currency": "USD", "lowest_leverage": "1", "highest_leverage": "100" } } ], "next_cursor": null}Fields
Section titled “Fields”MarketsPage
Section titled “MarketsPage”| Field | Type | Description |
|---|---|---|
data |
array of Market | One page of markets. |
next_cursor |
string, nullable | Pass as cursor to fetch the next page; null on the last page. Opaque - never construct or decode one. |
Market
Section titled “Market”| Field | Type | Description |
|---|---|---|
market_tag |
string | Opaque market identifier, accepted anywhere the API takes a market. Copy it from this endpoint; never construct or split it - the structured fields carry the components. |
exchange |
string | Exchange code. |
base |
string | Base currency - the asset being traded. |
quote |
string | Quote currency - the asset it is priced in. |
market_type |
MarketType | |
price_step |
string (decimal) | Smallest price increment. 0 means unconstrained. |
price_decimals |
integer (int32) | Decimal places of price precision. |
amount_step |
string (decimal) | Smallest order-amount increment. 0 means unconstrained. |
amount_decimals |
integer (int32) | Decimal places of amount precision. |
maker_fee |
string (decimal) | Maker fee, percent. |
taker_fee |
string (decimal) | Taker fee, percent. |
min_order_amount |
string (decimal) | Minimum order size, in base currency. 0 means no minimum. |
min_order_value |
string (decimal) | Minimum order notional, in quote currency. 0 means no minimum. |
max_order_amount |
string (decimal) | Maximum order size, in base currency. 0 means no maximum. |
max_order_value |
string (decimal) | Maximum order notional, in quote currency. 0 means no maximum. |
is_open |
boolean | Whether the market is currently open for trading. |
contract |
Contract | Contract details. null for spot markets. |
Contract
Section titled “Contract”| Field | Type | Description |
|---|---|---|
name |
string | Contract name. Empty on some venues - never parse it out of the market tag. |
type |
ContractType | |
margin_currency |
string | The asset margin is posted in. |
display_name |
string | |
contract_value |
string (decimal) | |
contract_value_currency |
string | |
lowest_leverage |
string (decimal) | |
highest_leverage |
string (decimal) |
Errors
Section titled “Errors”All errors are RFC 9457 problem documents.
| Status | Description |
|---|---|
400 |
The request is malformed (invalid limit, unusable cursor, …). (code: invalid_request) |
401 |
Missing, malformed, disabled, or revoked API key. (code: invalid_api_key) |
404 |
The requested exchange is not supported. (code: exchange_not_found) |
500 |
An unexpected error inside the API. Nothing about the request caused it; retry, and quote the instance value if it persists. (code: internal_error) |
502 |
An internal service answered in a way the API could not serve. Retry. (code: upstream_error) |
503 |
The request could not be served right now. Retry with the same key - do not discard it. (code: temporarily_unavailable) |
504 |
An internal service did not answer within the deadline. Retry with backoff. (code: upstream_timeout) |
{ "type": "https://docs.haasapi.com/errors/invalid_request", "title": "Invalid request", "status": 400, "detail": "The request is malformed (invalid limit, unusable cursor, …).", "code": "invalid_request"}