List enabled exchanges
GET https://rest.haasapi.com/v1/partner/exchanges
Returns the exchanges you can provision end-users on, each flagged spot and/or leverage.
Requires the partner scope.
Example request
Section titled “Example request”curl "https://rest.haasapi.com/v1/partner/exchanges" \ -H "Authorization: Bearer hk_live_YOUR_KEY"Response
Section titled “Response”200 OK. Returns a PartnerExchanges.
{ "data": [ { "exchange": "BINANCE", "name": "Binance", "is_spot": true, "is_leverage": false }, { "exchange": "BYBIT", "name": "Bybit", "is_spot": true, "is_leverage": true } ]}Fields
Section titled “Fields”PartnerExchanges
Section titled “PartnerExchanges”| Field | Type | Description |
|---|---|---|
data |
array of PartnerExchange | The exchanges you can provision end-users on. |
PartnerExchange
Section titled “PartnerExchange”| Field | Type | Description |
|---|---|---|
exchange |
string | The exchange code - the value you pass as exchange when provisioning an end-user. |
name |
string | Human-readable exchange name. |
is_spot |
boolean | |
is_leverage |
boolean | Whether the exchange trades leverage/futures markets. |
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) |
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"}