Exchange Info
Last updated
Last updated
The base URL for endpoints described in this page of live trading API is https://api.cube.exchange/ir/v0
.
Definitions are and provide all of the information needed to convert between on-chain amounts and the values used on the exchange. For further details, see the .
Some trading pairs appear in multiple markets, but only a single market will be in use for a given trading pair at any given time.
Definitions appear for markets that are no longer in use; these can be used to interpret historical orders.
Markets that are currently active for trading will have a status
of 1
or 2
.
Markets that are no longer in use will have a status
of 3
.
The REST API uses the following HTTP headers for authentication:
x-api-key
:
The API Key ID, as specified on the .
Each API key has an associated access level, which is determined at the time of key creation.
Read access allows only read HTTP methods (GET, HEAD, etc.).
Write access permits all HTTP methods.
x-api-signature
:
The API signature string authenticating this request.
The payload to be signed is a concatenation of the byte string cube.xyz
and the current Unix epoch timestamp in seconds, converted into an 8-byte little-endian array. The signature is the HMAC-SHA256 digest of the payload, using the secret key associated with the specified API key.
Implementation notes:
The signature is base-64 encoded with the 'standard' alphabet and padding: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/
.
The timestamp should be encoded as an 8-byte little-endian array of bytes.
The secret key should be decoded from a hex string into a 32-byte array of bytes.
x-api-timestamp
:
The timestamp used for signature generation.
Endpoints in this section require .
Statistics about the price of an asset during a specific time interval. Returned as an array of unnamed values to reduce size. Fields are: [ time (in seconds since epoch), open price, high price, low price, close price, volume (in RawUnits) ] Cached frequently to improve response time; provide 'Cache-Control: no-cache' header on request to pass through.
Returns the most recent orders where created_at < created_before
. If null, returns the most recent orders.
The maximum number of orders to return. If null, defaults to 100. The maximum is 1000.
{"name":"subaccount new name"}
The subaccount to withdraw from.
The asset to withdraw. The network is determined by the asset ID.
The amount to withdraw. This is denominated in the smallest unit of the asset (e.g. satoshis for BTC, wei for ETH, lamports for SOL). The amount must be greater than the dust limit for the asset.
The destination address for the withdrawal.
Base-64 encoded cube_ov_utils::ov_schema::PublicKey
Base-64 encoded signature of this withdrawal request