NAV Navbar
Shell HTTP JavaScript Ruby Python PHP Java Go

Qume API Documentation v1.1

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

Overview

Qume provides APIs for accessing exchange features programmatically. By querying REST endpoints and/or subscribing to WebSocket channels, developers can implement custom trading systems in any programming language capable of managing HTTP requests.

Authenticated REST endpoints are used for transactional operations, such as:

WebSocket channels provide real-time streams of information, including:

REST API

Create an API Key

To use the REST API, you must generate an API Key and API Secret on the “Accounts” page of the Qume website. Your API Secret only appears once, so make sure it is safely stored before exiting the page.

Example key generation output:

Authentication Headers

REST operations all require authentication. To authenticate a request, you must supply four HTTP headers:

Signing a Message

In order to generate X-QUME-SIGNATURE, you must perform the following steps:

  1. Concatenate request body + Unix timestamp + HTTP method + path.

    Example Output: {“foo”:”bar”}1538524732000GET/v1.1/orders


  2. Generate a HMAC-SHA-256 using the result from step 1 and your API Secret.

  3. Hex-encode the output.

NOTES - All request bodies should be valid JSON with content type application/json - If the request body is {}, treat it as an empty string - Include the /v1.1 prefix in the path - The Unix timestamp must be in milliseconds

Example

A shell script for placing a limit order via REST with authentication:

#!/bin/bash
public_key="$YOUR_API_KEY_HERE"
secret_key="$YOUR_API_SECRET_HERE"
pass="$YOUR_API_KEY_PASSPHRASE_HERE"

timestamp="$(($(date +'%s') * 1000))"
body='{ "symbol": "BTCUSDQ", "side": "BUY", "qty": 0.001, "price": 1000.5, "type": "LIMIT", "timeInForce": "UNTIL_CANCEL", "postOnly": false }'
path='/v1.1/orders'
http_method="POST"

message=$(printf '%s%s%s%s' "$body" "$timestamp" "$http_method" "$path")

sig=$(printf '%s' "$message" | openssl dgst -sha256 -hmac "$secret_key" -binary | od -A n -t x1 | tr -d '\n ')

curl "https://api.qume.io${path}" \
-H "Content-Type: application/json" \
-H "X-QUME-API-KEY: ${public_key}" \
-H "X-QUME-SIGNATURE: ${sig}" \
-H "X-QUME-TIMESTAMP: ${timestamp}" \
-H "X-QUME-PASSPHRASE: ${pass}" \
-d "$body"

WebSockets

Subscribe to data streams (“topics”)

Subscribe

To subscribe to a topic, open a websocket connection to wss://websocket.qume.io/public then send a message specifying the desired topic. - Example subscription message: { "topic" : "l2/BTCUSDQ" }

To unsubscribe, simply close the websocket connection.

Topics

Level-1 (Ticker)

Publishes a message every 0.5 second

Topic Name: l1/BTCUSDQ

Example of response message:

Response sample for l1/BTCUSDQ

{
    "TopicName": "l1/BTCUSDQ",
    "Message": {
      "Symbol": "BTCUSDQ",
      "BestBid":{"Qty":0.02,"Price":200},
      "BestAsk":{"Qty":0.01,"Price":1000},
      "Ts": {"seconds": 1552098314, "nanos": 834534238 }
    }
}

Publishes a message every 0.5 second and on every update.

Topic Name: l1RT/BTCUSDQ

Example of response message:

Response sample for l1RT/BTCUSDQ

{
    "TopicName": "l1RT/BTCUSDQ",
    "Message": {
      "Symbol": "BTCUSDQ",
      "BestBid":{"Qty":0.02,"Price":200},
      "BestAsk":{"Qty":0.01,"Price":1000},
      "Ts": {"seconds": 1552098314, "nanos": 834534238 }
    }
}

Level-2 (Orderbook)

Publishes a message every 0.5 second

Each message contains the top-50 price levels on each side of the order book.

Topic name: l2/BTCUSDQ

Example of response message:

Response sample for l2/BTCUSDQ

{
    "TopicName": "l2/BTCUSDQ",
    "Message": {
      "Symbol": "BTCUSDQ",
      "Bids": [{"Qty" : 1, "Price" : 82035}, ...],
      "Asks": [{"Qty" : 3, "Price" : 82040}, ...],
      "Ts":{"seconds":1595440674,"nanos":129381384}
    }
}

Publishes a new message when the order book changes.

Each message contains the top-50 price levels on each side of the order book.

Topic name: l2RT/BTCUSDQ

Example of response message:

Response sample for l2RT/BTCUSDQ

{
    "TopicName": "l2RT/BTCUSDQ",
    "Message": {
      "Symbol": "BTCUSDQ",
      "Bids": [{"Qty" : 1, "Price" : 82035}, ...],
      "Asks": [{"Qty" : 3, "Price" : 82040}, ...],
      "Ts":{"seconds":1595440674,"nanos":129381384}
    }
}

Market Statistics

Streams various market statistics.

Topic name: stats/BTCUSDQ

Example message:

{
    "TopicName": "stats/BTCUSDQ",
    "Message": {
      "Symbol": "BTCUSDQ",
      "Price": 300,
      "High": 350,
      "Low": 250,
      "Change": 25,
      "Volume": 2
    }
}

User Order Events

Stream your real-time order information. This is a private websocket requiring authentication.

Topic name: v1/orders

Authentication

All requests must contain a current timestamp -- a number that is never repeated and increases between requests (in order to help prevent replay attacks). You are responsible for incrementing this timestamp.

To sign your request, generate a signature based on your API Secret and payload. This payload should be unique to each request, and can be built by concatenating rhe timestamp, method, and request path url.

Sample Python code:

payload = timestamp + request.method + request.path_url
signature = hmac.new(secret_key, payload, hashlib.sha256).hexdigest()

The header of the websocket handshake GET request should include the following

{
    (...)
    'X-QUME-SIGNATURE': signature,
    'X-QUME-TIMESTAMP': timestamp,
    'X-QUME-API-KEY': api_key,
    'X-QUME-PASSPHRASE': user_passphrase,
    (...)
}

Events

After you have successfully authenticated and connected, the User Order Events websocket will provide you with the following:

  1. Connection confirmation
  2. List of your active orders at the time of connection confirmation
  3. Update when an order is placed, filled, or cancelled
  4. A heartbeat every five seconds to confirm the integrity of your connection

Every message sent from User Order Events WS will be a JSON message containing the following common fields:

The type field specifies the type of response. The types are as follows:

The following JSON fields are common to order_current_open, order_placed, order_filled, and order_cancelled responses: - Id - Price - Qty - UserId - Asset - Symbol - OriginalQty - Type - TimeInForce - PostOnly - TriggerType - TriggerPrice

Example message:

2019/08/20 17:32:08 {authentication_status Succesfully Authenticated as user '99d1ba64-dd9b-5879-a97e-0a82e7dc7711'}
2019/08/20 17:32:08 {order_current_open []}
2019/08/20 17:32:12 {heartbeat OK}
2019/08/20 17:32:17 {heartbeat OK}

User Trade Events

Stream real-time user trades data. This is a private websocket requiring authentication.

Topic name: v1/trades

Authentication

All requests must contain the current timestamp -- a number that is never repeated and increases between requests (in order to help prevent replay attacks). You are responsible for incrementing this timestamp. To sign your request, generate a signature based on your API Secret and payload. This payload should be unique to each request, and can be built by concatenating the timestamp, method, and request path url.

Sample Python code:

payload = timestamp + request.method + request.path_url signature = hmac.new(secret_key, payload, hashlib.sha256).hexdigest()

The header of the websocket handshake GET request should include the following:

{
  (...)
  'X-QUME-SIGNATURE': signature,
  'X-QUME-TIMESTAMP': timestamp,
  'X-QUME-API-KEY': api_key,
  'X-QUME-PASSPHRASE': user_passphrase,
  (...)
}

Events

After you have successfully authenticated and connected, the User Trade Events websocket will provide you with the following: 1. Connection confirmation 2. List of your historical trades (based on request) 3. Update when a Trade involving one of your open Orders happens 4. A heartbeat every five seconds to confirm the integrity of your connection

Every message sent from User Trade Events WS will be a JSON message containing the following common fields:

Requesting Historical Trades

In order to receive an initial snapshot containing your historical Trades, you need to send a JSON message to our WebSocket server, specifying on which Trade ID you want the historic snapshot to be started. For example, sending the following message: {"last_trade_id": 1574947969844680969} You will receive all historical Trades that happen after the Trade containing the provided ID. In case you want a full history, you should provide 0 as the ID.

Examples:

{"type":"authentication_status","message":"Succesfully Authenticated as user 'f4641534-afc1-5227-9f57-e662a4e4d7c9'")
{"type":"last_trades","message":[{"id":1574947969844680951,"symbol":"BTCUSDQ","price":7616,"qty":0.1,"order_id":1574947969844680949,"makerside":"BUY","is_maker":false},{"id":1574947969844680957,"symbol":"BTCUSDQ","price":7708,"qty":0.1,"order_id":1574947969844680955,"makerside":"SELL","is_maker":false},{"id":1574947969844680963,"symbol":"BTCUSDQ","price":7710,"qty":0.1,"order_id":1574947969844680961,"makerside":"SELL","is_maker":false},{"id":1574947969844680969,"symbol":"BTCUSDQ","price":7616,"qty":0.1,"order_id":1574947969844680967,"makerside":"BUY","is_maker":false},{"id":1574947969844680975,"symbol":"BTCUSDQ","price":7616,"qty":0.1,"order_id":1574947969844680973,"makerside":"BUY","is_maker":false}]}
{"type":"heartbeat","message":"OK"}
{"type":"heartbeat","message":"OK"}
{"type":"trade","message":{"id":1574947969844680990,"symbol":"BTCUSDQ","price":7616,"qty":0.1,"order_id":1574947969844680988,"makerside":"BUY","is_maker":false}}
{"type":"heartbeat","message":"OK"}

Rate Limiting

Please reach out to support@qume.io to request higher rate limits.

Base URLs:

License: MIT

Authentication

Market Data

GetAllMarketStats

Code samples

# You can also use wget
curl -X GET https://api.qume.io/v1.1/instruments \
  -H 'Accept: application/json'
GET https://api.qume.io/v1.1/instruments HTTP/1.1
Host: api.qume.io
Accept: application/json
const headers = {
  'Accept':'application/json'
};

fetch('https://api.qume.io/v1.1/instruments',
{
  method: 'GET',
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.qume.io/v1.1/instruments',
  params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api.qume.io/v1.1/instruments', headers = headers)

print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
    'Accept' => 'application/json',
    );
$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.qume.io/v1.1/instruments', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }
 // ...
URL obj = new URL("https://api.qume.io/v1.1/instruments");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main

import (
       "bytes"
       "net/http"
)

func main() {
    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.qume.io/v1.1/instruments", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /instruments

Get the market statistic for all markets

Example responses

200 Response

{
  "marketStats": [
    {
      "symbol": "string",
      "price": "string",
      "high": "string",
      "low": "string",
      "change": "string",
      "volume": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK A successful response. orderbookGetAllMarketStatsResponse

GetMarketStats

Code samples

# You can also use wget
curl -X GET https://api.qume.io/v1.1/instruments/{symbol} \
  -H 'Accept: application/json'
GET https://api.qume.io/v1.1/instruments/{symbol} HTTP/1.1
Host: api.qume.io
Accept: application/json
const headers = {
  'Accept':'application/json'
};

fetch('https://api.qume.io/v1.1/instruments/{symbol}',
{
  method: 'GET',
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.qume.io/v1.1/instruments/{symbol}',
  params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api.qume.io/v1.1/instruments/{symbol}', headers = headers)

print(r.json())
<?php
require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.qume.io/v1.1/instruments/{symbol}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...
URL obj = new URL("https://api.qume.io/v1.1/instruments/{symbol}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main

import (
       "bytes"
       "net/http"
)

func main() {
    headers := map[string][]string{
        "Accept": []string{"application/json"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.qume.io/v1.1/instruments/{symbol}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /instruments/{symbol}

Get the market statistics for the past 24 hours

Parameters

Name In Type Required Description
symbol path string true market symbol (e.g. BTCUSDQ)

Example responses

200 Response

{
  "marketStats": {
    "symbol": "string",
    "price": "string",
    "high": "string",
    "low": "string",
    "change": "string",
    "volume": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK A successful response. orderbookGetMarketStatsResponse

GetBidsAsksForMarket

Code samples

# You can also use wget
curl -X GET https://api.qume.io/v1.1/instruments/{symbol}/orderbook \
  -H 'Accept: application/json'
GET https://api.qume.io/v1.1/instruments/{symbol}/orderbook HTTP/1.1
Host: api.qume.io
Accept: application/json

const headers = {
  'Accept':'application/json'

};

fetch('https://api.qume.io/v1.1/instruments/{symbol}/orderbook',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.qume.io/v1.1/instruments/{symbol}/orderbook',
  params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api.qume.io/v1.1/instruments/{symbol}/orderbook', headers = headers)

print(r.json())
<?php
require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.qume.io/v1.1/instruments/{symbol}/orderbook', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...
URL obj = new URL("https://api.qume.io/v1.1/instruments/{symbol}/orderbook");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.qume.io/v1.1/instruments/{symbol}/orderbook", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /instruments/{symbol}/orderbook

List open orders for a given market grouped by bids and asks

Parameters

Name In Type Required Description
symbol path string true market symbol (e.g. 'BTCUSDQ')
limitBids query string(int64) false number of price levels (from best bid) to return
limitAsks query string(int64) false number of price levels (from best bid) to return

Example responses

200 Response

{
  "status": "OK",
  "bids": [
    {
      "price": "string",
      "amount": "string"
    }
  ],
  "asks": [
    {
      "price": "string",
      "amount": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK A successful response. orderbookGetBidsAsksForMarketResponse

GetTradesForMarket

Code samples

# You can also use wget
curl -X GET https://api.qume.io/v1.1/instruments/{symbol}/trades \
  -H 'Accept: application/json'
GET https://api.qume.io/v1.1/instruments/{symbol}/trades HTTP/1.1
Host: api.qume.io
Accept: application/json
const headers = {
  'Accept':'application/json'

};

fetch('https://api.qume.io/v1.1/instruments/{symbol}/trades',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.qume.io/v1.1/instruments/{symbol}/trades',
  params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api.qume.io/v1.1/instruments/{symbol}/trades', headers = headers)

print(r.json())
<?php
require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.qume.io/v1.1/instruments/{symbol}/trades', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...
URL obj = new URL("https://api.qume.io/v1.1/instruments/{symbol}/trades");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main

import (
       "bytes"
       "net/http"
)

func main() {
    headers := map[string][]string{
        "Accept": []string{"application/json"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.qume.io/v1.1/instruments/{symbol}/trades", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /instruments/{symbol}/trades

List historical trades for a given market

Parameters

Name In Type Required Description
symbol path string true market symbol (e.g. 'BTCUSDQ')
limit query string(uint64) false number of trades to return

Example responses

200 Response

{
  "status": "OK",
  "trades": [
    {
      "symbol": "string",
      "makerside": "BUY",
      "price": 0,
      "qty": "string",
      "ts": "2020-02-01T19:49:21Z",
      "id": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK A successful response. orderbookRestTradesForMarketResponse

GetFundingRate

Code samples

# You can also use wget
curl -X GET https://api.qume.io/v1.1/instruments/{symbol}/fundingRate \
  -H 'Accept: application/json'
GET https://api.qume.io/v1.1/instruments/{symbol}/fundingRate HTTP/1.1
Host: api.qume.io
Accept: application/json
const headers = {
  'Accept':'application/json'

};

fetch('https://api.qume.io/v1.1/instruments/{symbol}/fundingRate',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.qume.io/v1.1/instruments/{symbol}/fundingRate',
  params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api.qume.io/v1.1/instruments/{symbol}/fundingRate', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.qume.io/v1.1/instruments/{symbol}/fundingRate', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...
URL obj = new URL("https://api.qume.io/v1.1/instruments/{symbol}/fundingRate");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main

import (
       "bytes"
       "net/http"
)

func main() {
    headers := map[string][]string{
        "Accept": []string{"application/json"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.qume.io/v1.1/instruments/{symbol}/fundingRate", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /instruments/{symbol}/fundingRate

Get the current funding rate for a given market

Parameters

Name In Type Required Description
symbol path string true none

Example responses

200 Response

{
  "fundingRate": {
    "value": 0,
    "timestampNs": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK A successful response. pricesGetFundingRateResponse

GetCurrentIndexPrice

Code samples

# You can also use wget
curl -X GET https://api.qume.io/v1.1/instruments/{symbol}/indexPrice \
  -H 'Accept: application/json'

GET https://api.qume.io/v1.1/instruments/{symbol}/indexPrice HTTP/1.1
Host: api.qume.io
Accept: application/json


const headers = {
  'Accept':'application/json'

};

fetch('https://api.qume.io/v1.1/instruments/{symbol}/indexPrice',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.qume.io/v1.1/instruments/{symbol}/indexPrice',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api.qume.io/v1.1/instruments/{symbol}/indexPrice', headers = headers)

print(r.json())
<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.qume.io/v1.1/instruments/{symbol}/indexPrice', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.qume.io/v1.1/instruments/{symbol}/indexPrice");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.qume.io/v1.1/instruments/{symbol}/indexPrice", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /instruments/{symbol}/indexPrice

Returns the current instrument index price

Parameters

Name In Type Required Description
symbol path string true none

Example responses

200 Response

{
  "indexPrice": 0
}

Responses

Status Meaning Description Schema
200 OK A successful response. pricesGetCurrentIndexPriceResponse

GetMarketOHLC

Code samples

# You can also use wget
curl -X GET https://api.qume.io/v1.1/instruments/{symbol}/ohlc?candleWidth=60&timeStart=1583009135&timeEnd=1585341946 \
  -H 'Accept: application/json'

GET https://api.qume.io/v1.1/instruments/{symbol}/ohlc?candleWidth=60&timeStart=1583009135&timeEnd=1585341946 HTTP/1.1
Host: api.qume.io
Accept: application/json


const headers = {
  'Accept':'application/json'

};

fetch('https://api.qume.io/v1.1/instruments/{symbol}/ohlc?candleWidth=60&timeStart=1583009135&timeEnd=1585341946',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.qume.io/v1.1/instruments/{symbol}/ohlc?candleWidth=60&timeStart=1583009135&timeEnd=1585341946',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api.qume.io/v1.1/instruments/{symbol}/ohlc?candleWidth=60&timeStart=1583009135&timeEnd=1585341946', headers = headers)

print(r.json())
<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.qume.io/v1.1/instruments/{symbol}/ohlc?candleWidth=60&timeStart=1583009135&timeEnd=1585341946', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.qume.io/v1.1/instruments/{symbol}/ohlc?candleWidth=60&timeStart=1583009135&timeEnd=1585341946");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.qume.io/v1.1/instruments/{symbol}/ohlc?candleWidth=60&timeStart=1583009135&timeEnd=1585341946", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /instruments/{symbol}/ohlc

Returns the instrument OHLC (open,high,low,close) data aggregated in the width sent as query parameter

Parameters

Name In Type Required Description
symbol path string true none
candleWidth query int true The number of seconds to aggregate the data on. For example, 60 for 1 minute
timeStart query int true The epoch time in seconds for the first candle
timeEnd query int true The epoch time in seconds for the last candle

Example responses

200 Response

{
    "candlesticks": [
        {
            "symbol": "BTCUSDQ",
            "timeStart": 1583228040,
            "timeEnd": 1583228100,
            "priceOpen": "97005",
            "priceClose": "97005",
            "priceHigh": "97005",
            "priceLow": "97005",
            "volume": "970050"
        }
    ]
}

Responses

Status Meaning Description Schema
200 OK A successful response. orderbookGetMarketCandlesticksResponse

GetCurrentMarkPrice

Code samples

# You can also use wget
curl -X GET https://api.qume.io/v1.1/instruments/{symbol}/markPrice \
  -H 'Accept: application/json'

GET https://api.qume.io/v1.1/instruments/{symbol}/markPrice HTTP/1.1
Host: api.qume.io
Accept: application/json

const headers = {
  'Accept':'application/json'
};

fetch('https://api.qume.io/v1.1/instruments/{symbol}/markPrice',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.qume.io/v1.1/instruments/{symbol}/markPrice',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api.qume.io/v1.1/instruments/{symbol}/markPrice', headers = headers)

print(r.json())
<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.qume.io/v1.1/instruments/{symbol}/markPrice', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...
URL obj = new URL("https://api.qume.io/v1.1/instruments/{symbol}/markPrice");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.qume.io/v1.1/instruments/{symbol}/markPrice", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /instruments/{symbol}/markPrice

Returns the current instrument mark price

Parameters

Name In Type Required Description
symbol path string true none

Example responses

200 Response

{
  "markPrice": 0
}

Responses

Status Meaning Description Schema
200 OK A successful response. pricesGetCurrentMarkPriceResponse

Private

GetOrdersStatusForUser

Code samples

# You can also use wget
curl -X GET /v1.1/history/orders/report \
  -H 'Accept: application/json'

GET /v1.1/history/orders/report HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('/v1.1/history/orders/report',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get '/v1.1/history/orders/report',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('/v1.1/history/orders/report', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/v1.1/history/orders/report', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/v1.1/history/orders/report");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/v1.1/history/orders/report", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /v1.1/history/orders/report

Parameters

Name In Type Required Description
userId query string false none
orderId query string(uint64) false none
baseOrderHistoryId query string(int64) false none
size query string(int64) false none

Example responses

200 Response

{
  "status": "_unused_",
  "orders": [
    {
      "status": "_OrderActionType_unused_",
      "orderId": "string",
      "symbol": "string",
      "price": 0,
      "remainingQty": 0,
      "side": "_Side_unused_",
      "ts": "2020-04-11T16:34:25Z",
      "type": "_OrderType_unused_",
      "timeInForce": "_TimeInForce_unused_",
      "postOnly": true,
      "triggerType": "_StopOrderTrigger_unused_",
      "triggerPrice": 0,
      "avgPrice": 0,
      "filledQty": 0,
      "originalQty": 0
    }
  ],
  "page": {
    "next": "string",
    "hasNext": true
  }
}

Responses

Status Meaning Description Schema
200 OK A successful response. orderbookOrdersReportForUserResponse
default Default An unexpected error response runtimeError

GetOrdersHistoryForUser

Code samples

# You can also use wget
curl -X GET https://api.qume.io/v1.1/history/orders/events \
  -H 'Accept: application/json'

GET https://api.qume.io/v1.1/history/orders/events HTTP/1.1
Host: api.qume.io
Accept: application/json


const headers = {
  'Accept':'application/json'

};

fetch('https://api.qume.io/v1.1/history/orders/events',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.qume.io/v1.1/history/orders/events',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api.qume.io/v1.1/history/orders/events', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.qume.io/v1.1/history/orders/events', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.qume.io/v1.1/history/orders/events");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.qume.io/v1.1/history/orders/events", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /history/orders/events

List your orders history

Parameters

Name In Type Required Description
orderId query string(uint64) false order ID to filter history to return
baseOrderHistoryId query string(int64) false earliest order history entry to return
size query string(int64) false desired number of order history entry that chronologically post-date the order specified by 'baseOrderHistoryId'

Example responses

200 Response

{
  "status": "OK",
  "orders": [
    {
      "ts": "2020-02-01T19:49:21Z",
      "action_type": "NEW",
      "order_id": "string",
      "symbol": "string",
      "price": 0,
      "qty": "string",
      "side": "BUY",
      "asset": "string",
      "type": "LIMIT",
      "timeInForce": "UNTIL_CANCEL",
      "postOnly": true,
      "triggerType": "MARK_PRICE",
      "triggerPrice": 0
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK A successful response. orderbookRestOrdersHistoryForUserResponse

GetOrdersForUser

Code samples

# You can also use wget
curl -X GET https://api.qume.io/v1.1/orders \
  -H 'Accept: application/json'

GET https://api.qume.io/v1.1/orders HTTP/1.1
Host: api.qume.io
Accept: application/json


const headers = {
  'Accept':'application/json'

};

fetch('https://api.qume.io/v1.1/orders',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.qume.io/v1.1/orders',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api.qume.io/v1.1/orders', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.qume.io/v1.1/orders', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.qume.io/v1.1/orders");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.qume.io/v1.1/orders", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /orders

List your active orders

Parameters

Name In Type Required Description
baseOrderId query string(int64) false earliest active order to return
size query string(int64) false desired number of active orders that chronologically post-date the order specified by 'baseOrderId'

Example responses

200 Response

{
  "status": "OK",
  "orders": [
    {
      "ts": "2020-02-01T19:49:21Z",
      "id": "string",
      "price": 0,
      "qty": "string",
      "userId": "string",
      "asset": "string",
      "symbol": "string",
      "side": "BUY",
      "originalQty": "string",
      "type": "LIMIT",
      "timeInForce": "UNTIL_CANCEL",
      "postOnly": true,
      "triggerType": "MARK_PRICE",
      "triggerPrice": 0
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK A successful response. orderbookRestOrdersForUserResponse

AddOrder

Code samples

# You can also use wget
curl -X POST https://api.qume.io/v1.1/orders \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST https://api.qume.io/v1.1/orders HTTP/1.1
Host: api.qume.io
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "symbol": "string",
  "side": "BUY",
  "price": 0,
  "qty": "string",
  "userId": "string",
  "type": "LIMIT",
  "timeInForce": "UNTIL_CANCEL",
  "postOnly": true,
  "triggerType": "MARK_PRICE",
  "triggerPrice": 0
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'

};

fetch('https://api.qume.io/v1.1/orders',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://api.qume.io/v1.1/orders',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://api.qume.io/v1.1/orders', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.qume.io/v1.1/orders', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.qume.io/v1.1/orders");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.qume.io/v1.1/orders", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /orders

Place new order

Body parameter

{
  "symbol": "string",
  "side": "BUY",
  "price": 0,
  "qty": "string",
  "userId": "string",
  "type": "LIMIT",
  "timeInForce": "UNTIL_CANCEL",
  "postOnly": true,
  "triggerType": "MARK_PRICE",
  "triggerPrice": 0
}

Parameters

Name In Type Required Description
body body orderbookRestAddOrderRequest true none

Example responses

200 Response

{
  "transactTime": "2020-02-01T19:49:21Z",
  "orderId": "string",
  "symbol": "string",
  "side": "BUY",
  "price": 0,
  "orderQty": "string",
  "cumQty": "string",
  "leavesQty": "string",
  "orderType": "LIMIT",
  "timeInForce": "UNTIL_CANCEL",
  "postOnly": true,
  "stopTrigger": "MARK_PRICE",
  "stopPrice": 0
}

Responses

Status Meaning Description Schema
200 OK A successful response. orderbookRestExecutionReport

GetOrder

Code samples

# You can also use wget
curl -X GET https://api.qume.io/v1.1/orders/{orderId} \
  -H 'Accept: application/json'

GET https://api.qume.io/v1.1/orders/{orderId} HTTP/1.1
Host: api.qume.io
Accept: application/json


const headers = {
  'Accept':'application/json'

};

fetch('https://api.qume.io/v1.1/orders/{orderId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.qume.io/v1.1/orders/{orderId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api.qume.io/v1.1/orders/{orderId}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.qume.io/v1.1/orders/{orderId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.qume.io/v1.1/orders/{orderId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.qume.io/v1.1/orders/{orderId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /orders/{orderId}

Get order status

Parameters

Name In Type Required Description
orderId path string true unique ID of the specified order

Example responses

200 Response

{
  "status": "OK",
  "order": {
    "ts": "2020-02-01T19:49:21Z",
    "id": "string",
    "price": 0,
    "qty": "string",
    "userId": "string",
    "asset": "string",
    "symbol": "string",
    "side": "BUY",
    "originalQty": "string",
    "type": "LIMIT",
    "timeInForce": "UNTIL_CANCEL",
    "postOnly": true,
    "triggerType": "MARK_PRICE",
    "triggerPrice": 0
  }
}

Responses

Status Meaning Description Schema
200 OK A successful response. orderbookRestGetOrderResponse

CancelOrder

Code samples

# You can also use wget
curl -X DELETE https://api.qume.io/v1.1/orders/{orderId} \
  -H 'Accept: application/json'

DELETE https://api.qume.io/v1.1/orders/{orderId} HTTP/1.1
Host: api.qume.io
Accept: application/json


const headers = {
  'Accept':'application/json'

};

fetch('https://api.qume.io/v1.1/orders/{orderId}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.delete 'https://api.qume.io/v1.1/orders/{orderId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.delete('https://api.qume.io/v1.1/orders/{orderId}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://api.qume.io/v1.1/orders/{orderId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.qume.io/v1.1/orders/{orderId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api.qume.io/v1.1/orders/{orderId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /orders/{orderId}

Cancel active order

Parameters

Name In Type Required Description
orderId path string(uint64) true unique ID of the specified order

Example responses

200 Response

{
  "transactTime": "2020-02-01T19:49:21Z",
  "orderId": "string",
  "symbol": "string",
  "side": "BUY",
  "price": "string",
  "orderQty": "string",
  "cumQty": "string",
  "leavesQty": "string",
  "orderType": "LIMIT",
  "timeInForce": "UNTIL_CANCEL",
  "postOnly": true,
  "stopTrigger": "MARK_PRICE",
  "stopPrice": "string"
}

Responses

Status Meaning Description Schema
200 OK A successful response. orderbookExecutionReport

AddOrderBatch

Code samples

# You can also use wget
curl -X POST https://api.qume.io/v1.1/orders/batch \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST https://api.qume.io/v1.1/orders/batch HTTP/1.1
Host: api.qume.io
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "request": [
    {
      "symbol": "string",
      "side": "BUY",
      "price": 0,
      "qty": "string",
      "userId": "string",
      "type": "LIMIT",
      "timeInForce": "UNTIL_CANCEL",
      "postOnly": true,
      "triggerType": "MARK_PRICE",
      "triggerPrice": 0
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'

};

fetch('https://api.qume.io/v1.1/orders/batch',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://api.qume.io/v1.1/orders/batch',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://api.qume.io/v1.1/orders/batch', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.qume.io/v1.1/orders/batch', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.qume.io/v1.1/orders/batch");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.qume.io/v1.1/orders/batch", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /orders/batch

Place batch order

Body parameter

{
  "request": [
    {
      "symbol": "string",
      "side": "BUY",
      "price": 0,
      "qty": "string",
      "userId": "string",
      "type": "LIMIT",
      "timeInForce": "UNTIL_CANCEL",
      "postOnly": true,
      "triggerType": "MARK_PRICE",
      "triggerPrice": 0
    }
  ]
}

Parameters

Name In Type Required Description
body body orderbookRestAddOrderBatchRequest true none

Example responses

200 Response

{
  "response": [
    {
      "status": {
        "code": 0,
        "message": "string",
        "details": [
          {
            "typeUrl": "string",
            "value": "string"
          }
        ]
      },
      "rpt": {
        "transactTime": "2020-02-01T19:49:21Z",
        "orderId": "string",
        "symbol": "string",
        "side": "BUY",
        "price": 0,
        "orderQty": "string",
        "cumQty": "string",
        "leavesQty": "string",
        "orderType": "LIMIT",
        "timeInForce": "UNTIL_CANCEL",
        "postOnly": true,
        "stopTrigger": "MARK_PRICE",
        "stopPrice": 0
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK A successful response. orderbookRestAddOrderBatchResponse

GetTradesForUser

Code samples

# You can also use wget
curl -X GET https://api.qume.io/v1.1/trades \
  -H 'Accept: application/json'

GET https://api.qume.io/v1.1/trades HTTP/1.1
Host: api.qume.io
Accept: application/json


const headers = {
  'Accept':'application/json'

};

fetch('https://api.qume.io/v1.1/trades',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.qume.io/v1.1/trades',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api.qume.io/v1.1/trades', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.qume.io/v1.1/trades', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.qume.io/v1.1/trades");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.qume.io/v1.1/trades", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /trades

List your historical trades

Parameters

Name In Type Required Description
page.cursor query string(uint64) false earliest historical trade to return
page.size query integer(int32) false desired number of historical that chronologically post-date the order specified by 'baseOrderId'
page.orderBy query string false Optional.

Example responses

200 Response

{
  "status": "OK",
  "trades": [
    {
      "symbol": "string",
      "isMaker": true,
      "price": 0,
      "qty": "string",
      "userOrderId": 123456,
      "ts": "2020-02-01T19:49:21Z",
      "id": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK A successful response. orderbookRestTradesForUserResponse

LeverageSet

Code samples

# You can also use wget
curl -X PUT https://api.qume.io/v1.1/positions/{portfolio}/leverage \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

PUT https://api.qume.io/v1.1/positions/{portfolio}/leverage HTTP/1.1
Host: api.qume.io
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "userId": "string",
  "portfolio": "string",
  "leverage": 0
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'

};

fetch('https://api.qume.io/v1.1/positions/{portfolio}/leverage',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.put 'https://api.qume.io/v1.1/positions/{portfolio}/leverage',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.put('https://api.qume.io/v1.1/positions/{portfolio}/leverage', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://api.qume.io/v1.1/positions/{portfolio}/leverage', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.qume.io/v1.1/positions/{portfolio}/leverage");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://api.qume.io/v1.1/positions/{portfolio}/leverage", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /positions/{portfolio}/leverage

Modify current leverage for a given isolated margin portfolio

Body parameter

{
  "userId": "string",
  "portfolio": "string",
  "leverage": 0
}

Parameters

Name In Type Required Description
portfolio path string true symbol of the associated market (for the specified isolated margin portfolio)
body body orderbookLeverageSetRequest true none

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK A successful response. orderbookLeverageSetResponse

GetWallets

Code samples

# You can also use wget
curl -X GET https://api.qume.io/v1.1/wallets \
  -H 'Accept: application/json'

GET https://api.qume.io/v1.1/wallets HTTP/1.1
Host: api.qume.io
Accept: application/json


const headers = {
  'Accept':'application/json'

};

fetch('https://api.qume.io/v1.1/wallets',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.qume.io/v1.1/wallets',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api.qume.io/v1.1/wallets', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.qume.io/v1.1/wallets', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.qume.io/v1.1/wallets");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.qume.io/v1.1/wallets", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /wallets

Get wallet balances for each collateralizable asset

Example responses

200 Response

{
  "wallets": [
    {
      "walletId": "string",
      "asset": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK A successful response. walletWallets

GetWalletByUser

Code samples

# You can also use wget
curl -X GET https://api.qume.io/v1.1/wallets/{asset} \
  -H 'Accept: application/json'

GET https://api.qume.io/v1.1/wallets/{asset} HTTP/1.1
Host: api.qume.io
Accept: application/json


const headers = {
  'Accept':'application/json'

};

fetch('https://api.qume.io/v1.1/wallets/{asset}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.qume.io/v1.1/wallets/{asset}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api.qume.io/v1.1/wallets/{asset}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.qume.io/v1.1/wallets/{asset}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.qume.io/v1.1/wallets/{asset}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.qume.io/v1.1/wallets/{asset}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /wallets/{asset}

Get your wallet state for a specific asset

Parameters

Name In Type Required Description
asset path string true unique identifier for the asset

Example responses

200 Response

{
  "owner": "string",
  "availableBalance": "string",
  "balance": "string",
  "asset": "string",
  "addresses": [
    "string"
  ],
  "orderMargin": "string",
  "fee": "string",
  "positions": [
    "string"
  ],
  "enabled": true
}

Responses

Status Meaning Description Schema
200 OK A successful response. walletWalletState

GetPositionsByUser

Code samples

# You can also use wget
curl -X GET https://api.qume.io/v1.1/wallets/{asset}/positions \
  -H 'Accept: application/json'

GET https://api.qume.io/v1.1/wallets/{asset}/positions HTTP/1.1
Host: api.qume.io
Accept: application/json


const headers = {
  'Accept':'application/json'

};

fetch('https://api.qume.io/v1.1/wallets/{asset}/positions',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://api.qume.io/v1.1/wallets/{asset}/positions',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api.qume.io/v1.1/wallets/{asset}/positions', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.qume.io/v1.1/wallets/{asset}/positions', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.qume.io/v1.1/wallets/{asset}/positions");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.qume.io/v1.1/wallets/{asset}/positions", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /wallets/{asset}/positions

Get all your positions collateralized by a specific asset

Parameters

Name In Type Required Description
asset path string true Asset with which the position is collateralized

Example responses

200 Response

{
  "positions": [
    {
      "instrumentId": "string",
      "position": {
        "id": "string",
        "contract": {
          "id": "string",
          "initialMargin": 0,
          "maintenanceMargin": 0,
          "notional": "string"
        },
        "orderMargin": "string",
        "initialMargin": "string",
        "size": "string",
        "entryValue": "string",
        "leverage": "string",
        "realizedPnl": "string"
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK A successful response. walletGetPositionsResponse

Schemas

grpcpaginationPageResponse

{
  "nextCursor": "string",
  "hasPreviousPage": true,
  "hasNextPage": true,
  "data": [
    {
      "field1": "string",
      "field2": "string"
    }
  ]
}

Properties

Name Type Required Restrictions Description
nextCursor string(uint64) false none none
hasPreviousPage boolean(boolean) false none none
hasNextPage boolean(boolean) false none none
data [paginationPageData] false none none

orderbookBidsAsks

{
  "price": "string",
  "amount": "string"
}

Properties

Name Type Required Restrictions Description
price string(uint64) false none none
amount string(uint64) false none none

orderbookBook

{
  "symbol": "string",
  "closed": true,
  "marginAsset": "string",
  "ordersMax": "string",
  "balCoeff": "string",
  "leverageMax": 0,
  "markPriceTopic": "string",
  "orderMinQty": "string",
  "orderMaxQty": "string",
  "orderMinPrice": "string",
  "orderMaxPrice": "string",
  "feeRateMaker": "string",
  "feeRateTaker": "string",
  "priceCoeff": "string",
  "inversePrice": "INVERSE_PRICE",
  "fundingTopic": "string"
}

Properties

Name Type Required Restrictions Description
symbol string false none none
closed boolean(boolean) false none none
marginAsset string false none none
ordersMax string(uint64) false none none
balCoeff string(uint64) false none none
leverageMax number(double) false none none
markPriceTopic string false none none
orderMinQty string(uint64) false none none
orderMaxQty string(uint64) false none none
orderMinPrice string(uint64) false none none
orderMaxPrice string(uint64) false none none
feeRateMaker string(int64) false none none
feeRateTaker string(int64) false none none
priceCoeff string(uint64) false none none
inversePrice orderbookMarketInversePriceType false none none
fundingTopic string false none none

orderbookCandlestick

{
  "symbol": "string",
  "timeStart": 0,
  "timeEnd": 0,
  "priceOpen": "string",
  "priceClose": "string",
  "priceHigh": "string",
  "priceLow": "string",
  "volume": "string"
}

Properties

Name Type Required Restrictions Description
symbol string false none none
timeStart integer(int64) false none none
timeEnd integer(int64) false none none
priceOpen string false none none
priceClose string false none none
priceHigh string false none none
priceLow string false none none
volume string false none none

orderbookGetAllMarketStatsResponse

{
  "marketStats": [
    {
      "symbol": "string",
      "price": "string",
      "high": "string",
      "low": "string",
      "change": "string",
      "volume": "string"
    }
  ]
}

Properties

Name Type Required Restrictions Description
marketStats [orderbookMarketStats] false none none

orderbookGetBidsAsksForMarketResponse

{
  "status": "OK",
  "bids": [
    {
      "price": "string",
      "amount": "string"
    }
  ],
  "asks": [
    {
      "price": "string",
      "amount": "string"
    }
  ]
}

Properties

Name Type Required Restrictions Description
status orderbookGetBidsAsksForMarketResponseErrorCode false none none
bids [orderbookBidsAsks] false none none
asks [orderbookBidsAsks] false none none

orderbookGetBidsAsksForMarketResponseErrorCode

"OK"

Properties

Name Type Required Restrictions Description
anonymous string false none none

Enumerated Values

Property Value
anonymous OK

orderbookGetBooksResponse

{
  "books": [
    {
      "symbol": "string",
      "closed": true,
      "marginAsset": "string",
      "ordersMax": "string",
      "balCoeff": "string",
      "leverageMax": 0,
      "markPriceTopic": "string",
      "orderMinQty": "string",
      "orderMaxQty": "string",
      "orderMinPrice": "string",
      "orderMaxPrice": "string",
      "feeRateMaker": "string",
      "feeRateTaker": "string",
      "priceCoeff": "string",
      "inversePrice": "INVERSE_PRICE",
      "fundingTopic": "string"
    }
  ]
}

Properties

Name Type Required Restrictions Description
books [orderbookBook] false none none

orderbookGetMarketCandlesticksResponse

{
  "candlesticks": [
    {
      "symbol": "string",
      "timeStart": 0,
      "timeEnd": 0,
      "priceOpen": "string",
      "priceClose": "string",
      "priceHigh": "string",
      "priceLow": "string",
      "volume": "string"
    }
  ]
}

Properties

Name Type Required Restrictions Description
candlesticks [orderbookCandlestick] false none none

orderbookGetMarketStatsResponse

{
  "marketStats": {
    "symbol": "string",
    "price": "string",
    "high": "string",
    "low": "string",
    "change": "string",
    "volume": "string"
  }
}

Properties

Name Type Required Restrictions Description
marketStats orderbookMarketStats false none none

orderbookGetOrderResponse

{
  "status": "OK",
  "order": {
    "ts": "2020-02-01T19:49:21Z",
    "id": "string",
    "price": "string",
    "qty": "string",
    "userId": "string",
    "asset": "string",
    "symbol": "string",
    "side": "BUY",
    "originalQty": "string",
    "type": "LIMIT",
    "timeInForce": "UNTIL_CANCEL",
    "postOnly": true,
    "triggerType": "MARK_PRICE",
    "triggerPrice": "string"
  }
}

Properties

Name Type Required Restrictions Description
status orderbookGetOrderResponseErrorCode false none none
order orderbookOrder false none none

orderbookGetOrderResponseErrorCode

"OK"

Properties

Name Type Required Restrictions Description
anonymous string false none none

Enumerated Values

Property Value
anonymous OK

orderbookGetOrdersForMarketResponse

{
  "status": "OK",
  "orders": [
    {
      "ts": "2020-02-01T19:49:21Z",
      "id": "string",
      "price": "string",
      "qty": "string",
      "userId": "string",
      "asset": "string",
      "symbol": "string",
      "side": "BUY",
      "originalQty": "string",
      "type": "LIMIT",
      "timeInForce": "UNTIL_CANCEL",
      "postOnly": true,
      "triggerType": "MARK_PRICE",
      "triggerPrice": "string"
    }
  ],
  "page": {
    "next": "string",
    "hasNext": true
  }
}

Properties

Name Type Required Restrictions Description
status orderbookGetOrdersForMarketResponseErrorCode false none none
orders [orderbookOrder] false none none
page qumeorderbookPageResponse false none none

orderbookGetOrdersForMarketResponseErrorCode

"OK"

Properties

Name Type Required Restrictions Description
anonymous string false none none

Enumerated Values

Property Value
anonymous OK

orderbookGetPriceResponse

{
  "price": "string"
}

Properties

Name Type Required Restrictions Description
price string false none none

orderbookMarketInversePriceType

"INVERSE_PRICE"

Properties

Name Type Required Restrictions Description
anonymous string false none none

Enumerated Values

Property Value
anonymous INVERSE_PRICE
anonymous NON_INVERSE_PRICE

orderbookMarketStats

{
  "symbol": "string",
  "price": "string",
  "high": "string",
  "low": "string",
  "change": "string",
  "volume": "string"
}

Properties

Name Type Required Restrictions Description
symbol string false none none
price string false none none
high string false none none
low string false none none
change string false none none
volume string false none none

orderbookOrder

{
  "ts": "2020-02-01T19:49:21Z",
  "id": "string",
  "price": "string",
  "qty": "string",
  "userId": "string",
  "asset": "string",
  "symbol": "string",
  "side": "BUY",
  "originalQty": "string",
  "type": "LIMIT",
  "timeInForce": "UNTIL_CANCEL",
  "postOnly": true,
  "triggerType": "MARK_PRICE",
  "triggerPrice": "string"
}

Properties

Name Type Required Restrictions Description
ts string(date-time) false none none
id string(uint64) false none none
price string(uint64) false none none
qty string(uint64) false none Remaining unfilled quantity of order. For an order_new action, this
value always equals the original placed quantity: if the order
is partially/completely filled immediately, a subsequent
order_change/order_delete action will be included in the same
OrderbookUpdate indicating the order's resting state.
userId string false none none
asset string false none none
symbol string false none none
side orderbookSide false none none
originalQty string(uint64) false none none
type orderbookOrderType false none none
timeInForce orderbookTimeInForce false none none
postOnly boolean(boolean) false none none
triggerType orderbookStopOrderTrigger false none none
triggerPrice string(uint64) false none none

orderbookOrdersForUserResponse

{
  "status": "OK",
  "orders": [
    {
      "ts": "2020-02-01T19:49:21Z",
      "id": "string",
      "price": "string",
      "qty": "string",
      "userId": "string",
      "asset": "string",
      "symbol": "string",
      "side": "BUY",
      "originalQty": "string",
      "type": "LIMIT",
      "timeInForce": "UNTIL_CANCEL",
      "postOnly": true,
      "triggerType": "MARK_PRICE",
      "triggerPrice": "string"
    }
  ],
  "page": {
    "next": "string",
    "hasNext": true
  }
}

Properties

Name Type Required Restrictions Description
status orderbookOrdersForUserResponseErrorCode false none none
orders [orderbookOrder] false none none
page qumeorderbookPageResponse false none none

orderbookOrdersForUserResponseErrorCode

"OK"

Properties

Name Type Required Restrictions Description
anonymous string false none none

Enumerated Values

Property Value
anonymous OK

orderbookTrade

{
  "symbol": "string",
  "isMaker": true,
  "price": "string",
  "qty": "string",
  "ts": "2020-02-01T19:49:21Z",
  "id": "string"
}

Properties

Name Type Required Restrictions Description
symbol string false none none
isMaker boolean(boolean) false none none
price string(uint64) false none none
qty string(uint64) false none none
ts string(date-time) false none none
id string(uint64) false none none

orderbookTradeMarket

{
  "symbol": "string",
  "makerSide": "BUY",
  "price": "string",
  "qty": "string",
  "ts": "2020-02-01T19:49:21Z",
  "id": "string"
}

Properties

Name Type Required Restrictions Description
symbol string false none none
makerSide orderbookSide false none none
price string(uint64) false none none
qty string(uint64) false none none
ts string(date-time) false none none
id string(uint64) false none none

orderbookTradesForMarketResponse

{
  "status": "OK",
  "trades": [
    {
      "symbol": "string",
      "makerside": "BUY",
      "price": "string",
      "qty": "string",
      "ts": "2020-02-01T19:49:21Z",
      "id": "string"
    }
  ]
}

Properties

Name Type Required Restrictions Description
status orderbookTradesForMarketResponseErrorCode false none none
trades [orderbookTradeMarket] false none none

orderbookTradesForMarketResponseErrorCode

"OK"

Properties

Name Type Required Restrictions Description
anonymous string false none none

Enumerated Values

Property Value
anonymous OK

orderbookTradesForUserResponse

{
  "status": "OK",
  "trades": [
    {
      "symbol": "string",
      "isMaker": true,
      "price": "string",
      "qty": "string",
      "ts": "2020-02-01T19:49:21Z",
      "id": "string"
    }
  ],
  "page": {
    "nextCursor": "string",
    "hasPreviousPage": true,
    "hasNextPage": true,
    "data": [
      {
        "field1": "string",
        "field2": "string"
      }
    ]
  }
}

Properties

Name Type Required Restrictions Description
status orderbookTradesForUserResponseErrorCode false none none
trades [orderbookTrade] false none none
page grpcpaginationPageResponse false none none

orderbookTradesForUserResponseErrorCode

"OK"

Properties

Name Type Required Restrictions Description
anonymous string false none none

Enumerated Values

Property Value
anonymous OK

paginationPageData

{
  "field1": "string",
  "field2": "string"
}

Properties

Name Type Required Restrictions Description
field1 string(int64) false none none
field2 string(int64) false none none

qumeorderbookPageResponse

{
  "next": "string",
  "hasNext": true
}

Properties

Name Type Required Restrictions Description
next string(int64) false none none
hasNext boolean(boolean) false none none

orderbookRestGetOrderResponse

{
  "status": "OK",
  "order": {
    "ts": "2020-02-01T19:49:21Z",
    "id": "string",
    "price": 0,
    "qty": "string",
    "userId": "string",
    "asset": "string",
    "symbol": "string",
    "side": "BUY",
    "originalQty": "string",
    "type": "LIMIT",
    "timeInForce": "UNTIL_CANCEL",
    "postOnly": true,
    "triggerType": "MARK_PRICE",
    "triggerPrice": 0
  }
}

Properties

Name Type Required Restrictions Description
status orderbookRestGetOrderResponseErrorCode false none none
order orderbookRestOrder false none none

orderbookRestGetOrderResponseErrorCode

"OK"

Properties

Name Type Required Restrictions Description
anonymous string false none none

Enumerated Values

Property Value
anonymous OK

orderbookRestGetOrdersForMarketResponse

{
  "status": "OK",
  "orders": [
    {
      "ts": "2020-02-01T19:49:21Z",
      "id": "string",
      "price": 0,
      "qty": "string",
      "userId": "string",
      "asset": "string",
      "symbol": "string",
      "side": "BUY",
      "originalQty": "string",
      "type": "LIMIT",
      "timeInForce": "UNTIL_CANCEL",
      "postOnly": true,
      "triggerType": "MARK_PRICE",
      "triggerPrice": 0
    }
  ]
}

Properties

Name Type Required Restrictions Description
status orderbookRestGetOrdersForMarketResponseErrorCode false none none
orders [orderbookRestOrder] false none none

orderbookRestGetOrdersForMarketResponseErrorCode

"OK"

Properties

Name Type Required Restrictions Description
anonymous string false none none

Enumerated Values

Property Value
anonymous OK

orderbookRestOrderHistory

{
  "ts": "2020-02-01T19:49:21Z",
  "action_type": "NEW",
  "order_id": "string",
  "symbol": "string",
  "price": 0,
  "qty": "string",
  "side": "BUY",
  "asset": "string",
  "type": "LIMIT",
  "timeInForce": "UNTIL_CANCEL",
  "postOnly": true,
  "triggerType": "MARK_PRICE",
  "triggerPrice": 0
}

Properties

Name Type Required Restrictions Description
ts string(date-time) false none none
action_type orderbookOrderActionType false none none
order_id string(uint64) false none none
symbol string false none none
price number(double) false none none
qty string(double) false none none
side orderbookSide false none none
asset string false none none
type orderbookOrderType false none none
timeInForce orderbookTimeInForce false none none
postOnly boolean(boolean) false none none
triggerType orderbookStopOrderTrigger false none none
triggerPrice number(double) false none none

orderbookRestOrdersHistoryForUserResponse

{
  "status": "OK",
  "orders": [
    {
      "ts": "2020-02-01T19:49:21Z",
      "action_type": "NEW",
      "order_id": "string",
      "symbol": "string",
      "price": 0,
      "qty": "string",
      "side": "BUY",
      "asset": "string",
      "type": "LIMIT",
      "timeInForce": "UNTIL_CANCEL",
      "postOnly": true,
      "triggerType": "MARK_PRICE",
      "triggerPrice": 0
    }
  ]
}

Properties

Name Type Required Restrictions Description
status orderbookRestOrdersHistoryForUserResponseErrorCode false none none
orders [orderbookRestOrderHistory] false none none

orderbookRestOrdersHistoryForUserResponseErrorCode

"OK"

Properties

Name Type Required Restrictions Description
anonymous string false none none

Enumerated Values

Property Value
anonymous OK

orderbookRestOrder

{
  "ts": "2020-02-01T19:49:21Z",
  "id": "string",
  "price": 0,
  "qty": "string",
  "userId": "string",
  "asset": "string",
  "symbol": "string",
  "side": "BUY",
  "originalQty": "string",
  "type": "LIMIT",
  "timeInForce": "UNTIL_CANCEL",
  "postOnly": true,
  "triggerType": "MARK_PRICE",
  "triggerPrice": 0
}

Properties

Name Type Required Restrictions Description
ts string(date-time) false none none
id string(uint64) false none none
price number(double) false none none
qty string(uint64) false none Remaining unfilled quantity of order. For an order_new action, this
value always equals the original placed quantity: if the order
is partially/completely filled immediately, a subsequent
order_change/order_delete action will be included in the same
OrderbookUpdate indicating the order's resting state.
userId string false none none
asset string false none none
symbol string false none none
side orderbookSide false none none
originalQty string(uint64) false none none
type orderbookOrderType false none none
timeInForce orderbookTimeInForce false none none
postOnly boolean(boolean) false none none
triggerType orderbookStopOrderTrigger false none none
triggerPrice number(double) false none none

orderbookRestOrderReport

{
  "status": "_OrderActionType_unused_",
  "orderId": "string",
  "symbol": "string",
  "price": 0,
  "remainingQty": 0,
  "side": "_Side_unused_",
  "ts": "2020-04-11T16:34:25Z",
  "type": "_OrderType_unused_",
  "timeInForce": "_TimeInForce_unused_",
  "postOnly": true,
  "triggerType": "_StopOrderTrigger_unused_",
  "triggerPrice": 0,
  "avgPrice": 0,
  "filledQty": 0,
  "originalQty": 0
}

Properties

Name Type Required Restrictions Description
status orderbookOrderActionType false none none
orderId string(uint64) false none none
symbol string false none none
price number(double) false none none
remainingQty number(double) false none none
side orderbookSide false none none
ts string(date-time) false none none
type orderbookOrderType false none none
timeInForce orderbookTimeInForce false none none
postOnly boolean(boolean) false none none
triggerType orderbookStopOrderTrigger false none none
triggerPrice number(double) false none none
avgPrice number(double) false none none
filledQty number(double) false none none
originalQty number(double) false none none

orderbookOrdersReportForUserResponse

{
  "status": "_unused_",
  "orders": [
    {
      "status": "_OrderActionType_unused_",
      "orderId": "string",
      "symbol": "string",
      "price": 0,
      "remainingQty": 0,
      "side": "_Side_unused_",
      "ts": "2020-04-11T16:34:25Z",
      "type": "_OrderType_unused_",
      "timeInForce": "_TimeInForce_unused_",
      "postOnly": true,
      "triggerType": "_StopOrderTrigger_unused_",
      "triggerPrice": 0,
      "avgPrice": 0,
      "filledQty": 0,
      "originalQty": 0
    }
  ],
  "page": {
    "next": "string",
    "hasNext": true
  }
}

Properties

Name Type Required Restrictions Description
status orderbookOrdersReportForUserResponseErrorCode false none none
orders [orderbookRestOrderReport] false none none
page qumeorderbookPageResponse false none none

orderbookOrdersReportForUserResponseErrorCode

"_unused_"

Properties

Name Type Required Restrictions Description
anonymous string false none none

Enumerated Values

Property Value
anonymous unused
anonymous OK

orderbookRestOrdersForUserResponse

{
  "status": "OK",
  "orders": [
    {
      "ts": "2020-02-01T19:49:21Z",
      "id": "string",
      "price": 0,
      "qty": "string",
      "userId": "string",
      "asset": "string",
      "symbol": "string",
      "side": "BUY",
      "originalQty": "string",
      "type": "LIMIT",
      "timeInForce": "UNTIL_CANCEL",
      "postOnly": true,
      "triggerType": "MARK_PRICE",
      "triggerPrice": 0
    }
  ]
}

Properties

Name Type Required Restrictions Description
status orderbookRestOrdersForUserResponseErrorCode false none none
orders [orderbookRestOrder] false none none

orderbookRestOrdersForUserResponseErrorCode

"OK"

Properties

Name Type Required Restrictions Description
anonymous string false none none

Enumerated Values

Property Value
anonymous OK

orderbookRestTrade

{
  "symbol": "string",
  "isMaker": true,
  "price": 0,
  "qty": "string",
  "userOrderId": 123456,
  "ts": "2020-02-01T19:49:21Z",
  "id": "string"
}

Properties

Name Type Required Restrictions Description
symbol string false none none
isMaker boolean(boolean) false none none
price number(double) false none none
qty string(uint64) false none none
userOrderId string(uint64) false none none
ts string(date-time) false none none
id string(uint64) false none none

orderbookRestTradeMarket

{
  "symbol": "string",
  "makerSide": "BUY",
  "price": 0,
  "qty": "string",
  "ts": "2020-02-01T19:49:21Z",
  "id": "string"
}

Properties

Name Type Required Restrictions Description
symbol string false none none
makerSide orderbookSide false none none
price number(double) false none none
qty string(uint64) false none none
ts string(date-time) false none none
id string(uint64) false none none

orderbookRestTradesForMarketResponse

{
  "status": "OK",
  "trades": [
    {
      "symbol": "string",
      "makerside": "BUY",
      "price": 0,
      "qty": "string",
      "ts": "2020-02-01T19:49:21Z",
      "id": "string"
    }
  ]
}

Properties

Name Type Required Restrictions Description
status orderbookRestTradesForMarketResponseErrorCode false none none
trades [orderbookRestTradeMarket] false none none

orderbookRestTradesForMarketResponseErrorCode

"OK"

Properties

Name Type Required Restrictions Description
anonymous string false none none

Enumerated Values

Property Value
anonymous OK

orderbookRestTradesForUserResponse

{
  "status": "OK",
  "trades": [
    {
      "symbol": "string",
      "isMaker": true,
      "price": 0,
      "qty": "string",
      "userOrderId": 123456,
      "ts": "2020-02-01T19:49:21Z",
      "id": "string"
    }
  ]
}

Properties

Name Type Required Restrictions Description
status orderbookRestTradesForUserResponseErrorCode false none none
trades [orderbookRestTrade] false none none

orderbookRestTradesForUserResponseErrorCode

"OK"

Properties

Name Type Required Restrictions Description
anonymous string false none none

Enumerated Values

Property Value
anonymous OK

orderbookStopOrderTrigger

"MARK_PRICE"

Properties

Name Type Required Restrictions Description
anonymous string false none none

Enumerated Values

Property Value
anonymous MARK_PRICE
anonymous INDEX_PRICE
anonymous LAST_PRICE

orderbookRestAddOrderBatchRequest

{
  "request": [
    {
      "symbol": "string",
      "side": "BUY",
      "price": 0,
      "qty": "string",
      "userId": "string",
      "type": "LIMIT",
      "timeInForce": "UNTIL_CANCEL",
      "postOnly": true,
      "triggerType": "MARK_PRICE",
      "triggerPrice": 0
    }
  ]
}

Properties

Name Type Required Restrictions Description
request [orderbookRestAddOrderRequest] false none none

orderbookRestAddOrderBatchResponse

{
  "response": [
    {
      "status": {
        "code": 0,
        "message": "string",
        "details": [
          {
            "typeUrl": "string",
            "value": "string"
          }
        ]
      },
      "rpt": {
        "transactTime": "2020-02-01T19:49:21Z",
        "orderId": "string",
        "symbol": "string",
        "side": "BUY",
        "price": 0,
        "orderQty": "string",
        "cumQty": "string",
        "leavesQty": "string",
        "orderType": "LIMIT",
        "timeInForce": "UNTIL_CANCEL",
        "postOnly": true,
        "stopTrigger": "MARK_PRICE",
        "stopPrice": 0
      }
    }
  ]
}

Properties

Name Type Required Restrictions Description
response [orderbookRestAddOrderSingleResponse] false none none

orderbookRestAddOrderRequest

{
  "symbol": "string",
  "side": "BUY",
  "price": 0,
  "qty": "string",
  "userId": "string",
  "type": "LIMIT",
  "timeInForce": "UNTIL_CANCEL",
  "postOnly": true,
  "triggerType": "MARK_PRICE",
  "triggerPrice": 0
}

Properties

Name Type Required Restrictions Description
symbol string false none none
side orderbookSide false none none
price number(double) false none none
qty string(uint64) false none none
userId string false none none
type orderbookOrderType false none none
timeInForce orderbookTimeInForce false none none
postOnly boolean(boolean) false none none
triggerType orderbookStopOrderTrigger false none none
triggerPrice number(double) false none none

orderbookRestAddOrderSingleResponse

{
  "status": {
    "code": 0,
    "message": "string",
    "details": [
      {
        "typeUrl": "string",
        "value": "string"
      }
    ]
  },
  "rpt": {
    "transactTime": "2020-02-01T19:49:21Z",
    "orderId": "string",
    "symbol": "string",
    "side": "BUY",
    "price": 0,
    "orderQty": "string",
    "cumQty": "string",
    "leavesQty": "string",
    "orderType": "LIMIT",
    "timeInForce": "UNTIL_CANCEL",
    "postOnly": true,
    "stopTrigger": "MARK_PRICE",
    "stopPrice": 0
  }
}

Properties

Name Type Required Restrictions Description
status rpcStatus false none - Simple to use and understand for most users
- Flexible enough to meet unexpected needs
rpt orderbookRestExecutionReport false none none

orderbookRestExecutionReport

{
  "transactTime": "2020-02-01T19:49:21Z",
  "orderId": "string",
  "symbol": "string",
  "side": "BUY",
  "price": 0,
  "orderQty": "string",
  "cumQty": "string",
  "leavesQty": "string",
  "orderType": "LIMIT",
  "timeInForce": "UNTIL_CANCEL",
  "postOnly": true,
  "stopTrigger": "MARK_PRICE",
  "stopPrice": 0
}

Properties

Name Type Required Restrictions Description
transactTime string(date-time) false none none
orderId string(uint64) false none none
symbol string false none none
side orderbookSide false none none
price number(double) false none none
orderQty string(uint64) false none none
cumQty string(uint64) false none none
leavesQty string(uint64) false none Quantity open for further execution. If the order has been cancelled
or rejected, leaves_qty = 0.
Otherwise leaves_qty = order_qty - cum_qty.
orderType orderbookOrderType false none none
timeInForce orderbookTimeInForce false none none
postOnly boolean(boolean) false none none
stopTrigger orderbookStopOrderTrigger false none none
stopPrice number(double) false none none

protobufAny

{
  "typeUrl": "string",
  "value": "string"
}

Any contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message.

Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.

Example 1: Pack and unpack a message in C++.

Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... }

Example 2: Pack and unpack a message in Java.

Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); }

Example 3: Pack and unpack a message in Python.

foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ...

Example 4: Pack and unpack a message in Go

foo := &pb.Foo{...} any, err := ptypes.MarshalAny(foo) ... foo := &pb.Foo{} if err := ptypes.UnmarshalAny(any, foo); err != nil { ... }

The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z".

JSON

The JSON representation of an Any value uses the regular representation of the deserialized, embedded message, with an additional field @type which contains the type URL. Example:

package google.profile;
message Person {
  string first_name = 1;
  string last_name = 2;
}

{
  "@type": "type.googleapis.com/google.profile.Person",
  "firstName": <string>,
  "lastName": <string>
}

If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field value which holds the custom JSON in addition to the @type field. Example (for message [google.protobuf.Duration][]):

{
  "@type": "type.googleapis.com/google.protobuf.Duration",
  "value": "1.212s"
}

Properties

Name Type Required Restrictions Description
typeUrl string false none A URL/resource name that uniquely identifies the type of the serialized
protocol buffer message. This string must contain at least
one "/" character. The last segment of the URL's path must represent
the fully qualified name of the type (as in
path/google.protobuf.Duration). The name should be in a canonical form
(e.g., leading "." is not accepted).

In practice, teams usually precompile into the binary all types that they
expect it to use in the context of Any. However, for URLs which use the
scheme http, https, or no scheme, one can optionally set up a type
server that maps type URLs to message definitions as follows:

* If no scheme is provided, https is assumed.
* An HTTP GET on the URL must yield a [google.protobuf.Type][]
value in binary format, or produce an error.
* Applications are allowed to cache lookup results based on the
URL, or have them precompiled into a binary to avoid any
lookup. Therefore, binary compatibility needs to be preserved
on changes to types. (Use versioned type names to manage
breaking changes.)

Note: this functionality is not currently available in the official
protobuf release, and it is not used for type URLs beginning with
type.googleapis.com.

Schemes other than http, https (or the empty scheme) might be
used with implementation specific semantics.
value string(byte) false none Must be a valid serialized protocol buffer of the above specified type.

rpcStatus

{
  "code": 0,
  "message": "string",
  "details": [
    {
      "typeUrl": "string",
      "value": "string"
    }
  ]
}

Properties

Name Type Required Restrictions Description
code integer(int32) false none The status code, which should be an enum value of
[google.rpc.Code][google.rpc.Code].
message string false none A developer-facing error message, which should be in English. Any
user-facing error message should be localized and sent in the
[google.rpc.Status.details][google.rpc.Status.details] field, or localized
by the client.
details [protobufAny] false none A list of messages that carry the error details. There is a common set of
message types for APIs to use.

orderbookAddOrderBatchResponse

{
  "response": [
    {
      "status": {
        "code": 0,
        "message": "string",
        "details": [
          {
            "typeUrl": "string",
            "value": "string"
          }
        ]
      },
      "rpt": {
        "transactTime": "2020-02-01T19:49:21Z",
        "orderId": "string",
        "symbol": "string",
        "side": "BUY",
        "price": "string",
        "orderQty": "string",
        "cumQty": "string",
        "leavesQty": "string",
        "orderType": "LIMIT",
        "timeInForce": "UNTIL_CANCEL",
        "postOnly": true,
        "stopTrigger": "MARK_PRICE",
        "stopPrice": "string"
      }
    }
  ]
}

Properties

Name Type Required Restrictions Description
response [orderbookAddOrderSingleResponse] false none none

orderbookAddOrderRequest

{
  "symbol": "string",
  "side": "BUY",
  "price": "string",
  "qty": "string",
  "userId": "string",
  "type": "LIMIT",
  "timeInForce": "UNTIL_CANCEL",
  "postOnly": true,
  "triggerType": "MARK_PRICE",
  "triggerPrice": "string"
}

Properties

Name Type Required Restrictions Description
symbol string false none none
side orderbookSide false none none
price string(uint64) false none none
qty string(uint64) false none none
userId string false none none
type orderbookOrderType false none none
timeInForce orderbookTimeInForce false none none
postOnly boolean(boolean) false none none
triggerType orderbookStopOrderTrigger false none none
triggerPrice string(uint64) false none none

orderbookAddOrderSingleResponse

{
  "status": {
    "code": 0,
    "message": "string",
    "details": [
      {
        "typeUrl": "string",
        "value": "string"
      }
    ]
  },
  "rpt": {
    "transactTime": "2020-02-01T19:49:21Z",
    "orderId": "string",
    "symbol": "string",
    "side": "BUY",
    "price": "string",
    "orderQty": "string",
    "cumQty": "string",
    "leavesQty": "string",
    "orderType": "LIMIT",
    "timeInForce": "UNTIL_CANCEL",
    "postOnly": true,
    "stopTrigger": "MARK_PRICE",
    "stopPrice": "string"
  }
}

Properties

Name Type Required Restrictions Description
status rpcStatus false none - Simple to use and understand for most users
- Flexible enough to meet unexpected needs
rpt orderbookExecutionReport false none Some field names are based on the corresponding FIX tag name.

orderbookBalanceGetResponse

{
  "balance": "string"
}

Properties

Name Type Required Restrictions Description
balance string false none none

orderbookBookAddResponse

{}

Properties

None

orderbookCancelOrderBatchResponse

{
  "response": [
    {
      "status": {
        "code": 0,
        "message": "string",
        "details": [
          {
            "typeUrl": "string",
            "value": "string"
          }
        ]
      },
      "rpt": {
        "transactTime": "2020-02-01T19:49:21Z",
        "orderId": "string",
        "symbol": "string",
        "side": "BUY",
        "price": "string",
        "orderQty": "string",
        "cumQty": "string",
        "leavesQty": "string",
        "orderType": "LIMIT",
        "timeInForce": "UNTIL_CANCEL",
        "postOnly": true,
        "stopTrigger": "MARK_PRICE",
        "stopPrice": "string"
      }
    }
  ]
}

Properties

Name Type Required Restrictions Description
response [orderbookCancelOrderSingleResponse] false none none

orderbookCancelOrderRequest

{
  "orderId": "string"
}

Properties

Name Type Required Restrictions Description
orderId string(uint64) false none none

orderbookCancelOrderSingleResponse

{
  "status": {
    "code": 0,
    "message": "string",
    "details": [
      {
        "typeUrl": "string",
        "value": "string"
      }
    ]
  },
  "rpt": {
    "transactTime": "2020-02-01T19:49:21Z",
    "orderId": "string",
    "symbol": "string",
    "side": "BUY",
    "price": "string",
    "orderQty": "string",
    "cumQty": "string",
    "leavesQty": "string",
    "orderType": "LIMIT",
    "timeInForce": "UNTIL_CANCEL",
    "postOnly": true,
    "stopTrigger": "MARK_PRICE",
    "stopPrice": "string"
  }
}

Properties

Name Type Required Restrictions Description
status rpcStatus false none - Simple to use and understand for most users
- Flexible enough to meet unexpected needs
rpt orderbookExecutionReport false none Some field names are based on the corresponding FIX tag name.

orderbookExecutionReport

{
  "transactTime": "2020-02-01T19:49:21Z",
  "orderId": "string",
  "symbol": "string",
  "side": "BUY",
  "price": "string",
  "orderQty": "string",
  "cumQty": "string",
  "leavesQty": "string",
  "orderType": "LIMIT",
  "timeInForce": "UNTIL_CANCEL",
  "postOnly": true,
  "stopTrigger": "MARK_PRICE",
  "stopPrice": "string"
}

Some field names are based on the corresponding FIX tag name.

Properties

Name Type Required Restrictions Description
transactTime string(date-time) false none none
orderId string(uint64) false none none
symbol string false none none
side orderbookSide false none none
price string(uint64) false none none
orderQty string(uint64) false none none
cumQty string(uint64) false none none
leavesQty string(uint64) false none Quantity open for further execution. If the order has been cancelled
or rejected, leaves_qty = 0.
Otherwise leaves_qty = order_qty - cum_qty.
orderType orderbookOrderType false none none
timeInForce orderbookTimeInForce false none none
postOnly boolean(boolean) false none none
stopTrigger orderbookStopOrderTrigger false none none
stopPrice string(uint64) false none none

orderbookLeverageSetRequest

{
  "userId": "string",
  "portfolio": "string",
  "leverage": 0
}

Properties

Name Type Required Restrictions Description
userId string false none none
portfolio string false none none
leverage number(double) false none none

orderbookLeverageSetResponse

{}

Properties

None

orderbookOrderType

"LIMIT"

Properties

Name Type Required Restrictions Description
anonymous string false none none

Enumerated Values

Property Value
anonymous LIMIT
anonymous STOP_LIMIT
anonymous MARKET
anonymous STOP_MARKET

orderbookOrderActionType

"NEW"

Properties

Name Type Required Restrictions Description
anonymous string false none none

Enumerated Values

Property Value
anonymous NEW
anonymous CHANGE
anonymous DELETE

orderbookSide

"BUY"

Properties

Name Type Required Restrictions Description
anonymous string false none none

Enumerated Values

Property Value
anonymous BUY
anonymous SELL

orderbookTimeInForce

"UNTIL_CANCEL"

Properties

Name Type Required Restrictions Description
anonymous string false none none

Enumerated Values

Property Value
anonymous UNTIL_CANCEL
anonymous FILL_OR_KILL
anonymous IMMEDIATE_OR_CANCEL

paginationPageRequest

{
  "cursor": "string",
  "size": 0,
  "orderBy": "string"
}

Properties

Name Type Required Restrictions Description
cursor string(uint64) false none none
size integer(int32) false none none
orderBy string false none none

paginationPageResponse

{
  "nextCursor": "string",
  "hasPreviousPage": true,
  "hasNextPage": true,
  "data": [
    {
      "field1": "string",
      "field2": "string"
    }
  ]
}

Properties

Name Type Required Restrictions Description
nextCursor string(uint64) false none none
hasPreviousPage boolean(boolean) false none none
hasNextPage boolean(boolean) false none none
data [paginationPageData] false none none

pricesDelayIndexPriceResponse

{
  "success": true
}

Properties

Name Type Required Restrictions Description
success boolean(boolean) false none none

pricesDelayMarkPriceResponse

{
  "success": true
}

Properties

Name Type Required Restrictions Description
success boolean(boolean) false none none

pricesGetCurrentIndexPriceResponse

{
  "indexPrice": 0
}

Properties

Name Type Required Restrictions Description
indexPrice number(double) false none none

pricesGetCurrentMarkPriceResponse

{
  "markPrice": 0
}

Properties

Name Type Required Restrictions Description
markPrice number(double) false none none

pricesGetFundingRateHistResponse

{
  "fundingRates": [
    {
      "value": 0,
      "timestampNs": "string"
    }
  ],
  "estimatedCount": "string",
  "page": {
    "nextCursor": "string",
    "hasPreviousPage": true,
    "hasNextPage": true,
    "data": [
      {
        "field1": "string",
        "field2": "string"
      }
    ]
  }
}

Properties

Name Type Required Restrictions Description
fundingRates [pricesValueWithTs] false none none
estimatedCount string(int64) false none none
page paginationPageResponse false none none

pricesGetFundingRateResponse

{
  "fundingRate": {
    "value": 0,
    "timestampNs": "string"
  }
}

Properties

Name Type Required Restrictions Description
fundingRate pricesValueWithTs false none none

pricesGetIndexPriceHistResponse

{
  "indexPrices": [
    {
      "id": "string",
      "price": 0,
      "providers": [
        {
          "name": "string",
          "price": 0
        }
      ],
      "skipped": [
        {
          "name": "string",
          "price": 0
        }
      ]
    }
  ],
  "estimatedCount": "string",
  "page": {
    "nextCursor": "string",
    "hasPreviousPage": true,
    "hasNextPage": true,
    "data": [
      {
        "field1": "string",
        "field2": "string"
      }
    ]
  }
}

Properties

Name Type Required Restrictions Description
indexPrices [pricesIndexPriceData] false none none
estimatedCount string(int64) false none none
page paginationPageResponse false none none

pricesGetMarkPriceHistResponse

{
  "markPrice": [
    {
      "value": 0,
      "timestampNs": "string"
    }
  ],
  "pageToken": "string"
}

Properties

Name Type Required Restrictions Description
markPrice [pricesValueWithTs] false none none
pageToken string(int64) false none none

pricesIndexPriceData

{
  "id": "string",
  "price": 0,
  "providers": [
    {
      "name": "string",
      "price": 0
    }
  ],
  "skipped": [
    {
      "name": "string",
      "price": 0
    }
  ]
}

Properties

Name Type Required Restrictions Description
id string(int64) false none none
price number(double) false none none
providers [pricesIndexPriceProvider] false none none
skipped [pricesIndexPriceProvider] false none none

pricesIndexPriceProvider

{
  "name": "string",
  "price": 0
}

Properties

Name Type Required Restrictions Description
name string false none none
price number(double) false none none

pricesValueWithTs

{
  "value": 0,
  "timestampNs": "string"
}

Properties

Name Type Required Restrictions Description
value number(double) false none none
timestampNs string(int64) false none none

WithdrawRequestTxType

"EXTERNAL"

Whether this withdrawal was initiated by a user (external) or us (internal)

Properties

Name Type Required Restrictions Description
Whether this withdrawal was initiated by a user (external) or us (internal) string false none none

Enumerated Values

Property Value
Whether this withdrawal was initiated by a user (external) or us (internal) EXTERNAL
Whether this withdrawal was initiated by a user (external) or us (internal) INTERNAL

walletCheckDepositTxResponse

{
  "delivered": true
}

Properties

Name Type Required Restrictions Description
delivered boolean(boolean) false none none

walletContract

{
  "id": "string",
  "initialMargin": 0,
  "maintenanceMargin": 0,
  "notional": "string"
}

Properties

Name Type Required Restrictions Description
id string false none none
initialMargin number(double) false none none
maintenanceMargin number(double) false none none
notional string false none none

walletCreateAddressResponse

{
  "address": "string"
}

Properties

Name Type Required Restrictions Description
address string false none none

walletCreateWalletResponse

{
  "walletId": "string"
}

Properties

Name Type Required Restrictions Description
walletId string false none none

walletDisableWalletResponse

{
  "disabled": true
}

Properties

Name Type Required Restrictions Description
disabled boolean(boolean) false none none

walletGetPositionsResponse

{
  "positions": [
    {
      "instrumentId": "string",
      "position": {
        "id": "string",
        "contract": {
          "id": "string",
          "initialMargin": 0,
          "maintenanceMargin": 0,
          "notional": "string"
        },
        "orderMargin": "string",
        "initialMargin": "string",
        "size": "string",
        "entryValue": "string",
        "leverage": "string",
        "realizedPnl": "string"
      }
    }
  ]
}

Properties

Name Type Required Restrictions Description
positions [walletPositionMap] false none none

walletGetUsersResponse

{
  "users": [
    "string"
  ],
  "pagination": {
    "fromOffset": "string",
    "recordsPerPage": "string",
    "total": "string"
  }
}

Properties

Name Type Required Restrictions Description
users [string] false none none
pagination walletPagination false none none

walletInternalWithdrawResponse

{
  "id": "string"
}

Properties

Name Type Required Restrictions Description
id string false none none

walletPagination

{
  "fromOffset": "string",
  "recordsPerPage": "string",
  "total": "string"
}

Properties

Name Type Required Restrictions Description
fromOffset string(int64) false none none
recordsPerPage string(int64) false none none
total string(int64) false none none

walletPosition

{
  "id": "string",
  "contract": {
    "id": "string",
    "initialMargin": 0,
    "maintenanceMargin": 0,
    "notional": "string"
  },
  "orderMargin": "string",
  "initialMargin": "string",
  "size": "string",
  "entryValue": "string",
  "leverage": "string",
  "realizedPnl": "string"
}

Properties

Name Type Required Restrictions Description
id string false none none
contract walletContract false none none
orderMargin string false none none
initialMargin string false none none
size string false none none
entryValue string false none none
leverage string false none none
realizedPnl string false none none

walletPositionMap

{
  "instrumentId": "string",
  "position": {
    "id": "string",
    "contract": {
      "id": "string",
      "initialMargin": 0,
      "maintenanceMargin": 0,
      "notional": "string"
    },
    "orderMargin": "string",
    "initialMargin": "string",
    "size": "string",
    "entryValue": "string",
    "leverage": "string",
    "realizedPnl": "string"
  }
}

Properties

Name Type Required Restrictions Description
instrumentId string false none none
position walletPosition false none none

walletTransaction

{
  "eventType": "string",
  "amount": "string",
  "timestamp": "string"
}

Properties

Name Type Required Restrictions Description
eventType string false none none
amount string false none none
timestamp string(int64) false none none

walletWalletHistory

{
  "transactions": [
    {
      "eventType": "string",
      "amount": "string",
      "timestamp": "string"
    }
  ],
  "totalBalance": "string"
}

Properties

Name Type Required Restrictions Description
transactions [walletTransaction] false none none
totalBalance string false none none

walletWalletState

{
  "owner": "string",
  "availableBalance": "string",
  "balance": "string",
  "asset": "string",
  "addresses": [
    "string"
  ],
  "orderMargin": "string",
  "fee": "string",
  "positions": [
    "string"
  ],
  "enabled": true
}

Properties

Name Type Required Restrictions Description
owner string false none none
availableBalance string false none none
balance string false none none
asset string false none none
addresses [string] false none none
orderMargin string false none none
fee string false none none
positions [string] false none none
enabled boolean(boolean) false none none

walletWalletSummary

{
  "walletId": "string",
  "asset": "string"
}

Properties

Name Type Required Restrictions Description
walletId string false none none
asset string false none none

walletWallets

{
  "wallets": [
    {
      "walletId": "string",
      "asset": "string"
    }
  ]
}

Properties

Name Type Required Restrictions Description
wallets [walletWalletSummary] false none none

walletWithdrawResponse

{
  "id": "string"
}

Properties

Name Type Required Restrictions Description
id string false none none