Overview
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
NetCents provides a REST API for programmatically accessing market data, account info and placing orders. Endpoints are broken down into several groups, requests under exchange and market data are public methods, account info and trading requests require authentication as detailed below. Additionally, requests in the trading section require the appropriate permission on the API key being used.
The base URL for all requests is https://serve.net-cents.com/api/v1. Please note there is a limit of 60 requests per 1 minute period. Exceeding this limit will result in a temporary ban.
Authentication
To make authenticated requests you must first generate an access key and secret pair at API Access.
All authenticated requests require the following 3 parameters in addition to any endpoint specific parameters detailed below:
require 'openssl'
require 'rest-client'
access_key = 'xxx'
secret = 'yyy'
nonce = (Time.now.to_f * 1000).to_i
payload = "GET|/api/v1/balances|access_key=#{access_key}&nonce=#{nonce}"
signature = OpenSSL::HMAC.hexdigest('sha256', secret, payload)
response = RestClient.get("http:/https://serve.net-cents.com/api/v1/balances?access_key=#{access_key}&nonce=#{nonce}&signature=#{signature}")
puts signature
>> 'c2eb81d7e4a05ba1304e72845ca7a45dd4e255ad0fdb3fa2a77f2ec76874a9f6'
import hashlib
import hmac
import requests
import time
access_key = 'xxx'
secret = 'yyy'
nonce = int(time.time() * 1000)
payload = f'GET|/api/v1/balances|access_key={access_key}&nonce={nonce}'
h = hmac.new(secret.encode(), payload.encode(), hashlib.sha256)
signature = h.hexdigest()
response = requests.get(f'http:/https://serve.net-cents.com/api/v1/balances?access_key={access_key}&nonce={nonce}&signature={signature}')
print(signature)
>> '18c4f801785c179f67629afc9aaf98069aed761ab1251d6cc61339160f63a419'
Parameter | Description |
---|---|
access_key | Obtained from the API Access page |
nonce | Integer timestamp, representing the number of milliseconds elapsed since Unix epoch. Nonce must be within 30 seconds of server’s current time. Each nonce can only be used once. |
signature | HMAC-SHA256 of request payload signed with secret generated on the API Access page |
Signature is a hash of the request (in canonical string form).
Payload is a combination of HTTP method, URI, and query string separated by the vertical bar character "|":
HTTP method is either GET or POST in uppercase.
URI is the request path like /api/v1/balances.
Query is the request query sorted in alphabetical order by key, including access_key and nonce, e.g. access_key=xxx&foo=bar&nonce=123456789
The final payload looks like:
GET|/api/v1/balances|access_key=xxx&foo=bar&nonce=123456789
Errors
{ "error": { "code": 1001, "message": "market does not have a valid value" } }
All error messages will be returned in a standard format with a code and a message describing the error. A list of all possible error codes is shown in the table below.
Code | Message | HTTP Status |
---|---|---|
1001 | <validation_error> | |
2001 | Authorization failed | 401 |
2002 | Failed to create order. Reason: <reason> | 400 |
2003 | Failed to cancel order. Reason: <reason> | 400 |
2004 | Order#<id> doesn’t exist. | 404 |
2005 | Signature <signature> is incorrect. | 401 |
2006 | The nonce <nonce> has already been used by access key <access_key>. | 401 |
2007 | The nonce <nonce> is invalid, current timestamp is <timestamp>. | 401 |
2008 | The access key <access_key> does not exist. | 401 |
2011 | Requested API is out of access key scopes. | 401 |
3001 | Exchange is currently undergoing maintenance | 503 |
Exchange
Get Timestamp
Example response
1585774023
GET https://serve.net-cents.com/api/v1/timestamp
Get server current time, in seconds since Unix epoch.
Get Markets
GET https://serve.net-cents.com/api/v1/markets
Get all available markets.
Example Response
[
{
"id": "btccad",
"name": "BTC / CAD",
"base_unit": "BTC",
"quote_unit": "CAD",
"base_precision": 8,
"quote_precision": 2
}
]
Response Schema
Name | Type | Description |
---|---|---|
id | string | Unique market id. It is the base currency code followed by the quote currency code. See Market for possible options. |
name | string | Market name as used in the UI |
base_unit | string | Currency code for the market base unit |
quote_unit | string | Currency code for the market quote unit |
base_precision | integer | Decimal precision for the base unit |
quote_precision | integer | Decimal precision for the quote unit |
Get Currencies
GET https://serve.net-cents.com/api/v1/currencies
Get all currencies.
Example Response
[
{
"symbol": "BTC",
"name": "Bitcoin",
"deposit_enabled": true,
"withdrawal_enabled": true
}
]
Response Schema
Name | Type |
---|---|
symbol | string |
name | string |
deposit_enabled | boolean |
withdrawal_enabled | boolean |
Market data
Get Ticker
Example Request
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get "https://serve.net-cents.com/api/v1/tickers/#{market}", headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get(f'https://serve.net-cents.com/api/v1/tickers/{market}', headers = headers)
print r.json()
GET https://serve.net-cents.com/api/v1/tickers/{market}
Get ticker of specific market.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
market | path | string | true | Unique market id. It is the base currency code followed by the quote currency code. See Market for possible options. |
Example Response
{
"market": "btccad",
"at": 1543338291,
"open": "5310.10",
"low": "5310.10",
"high": "5385.0",
"last": "5321.0",
"vol": "45.168"
}
Get Tickers
GET https://serve.net-cents.com/api/v1/tickers
Get ticker of all markets.
Example Response
[
{
"market": "btccad",
"at": 1543338291,
"open": "5310.10",
"low": "5310.10",
"high": "5385.0",
"last": "5321.0",
"vol": "45.168"
}
]
Response Schema
Name | Type | Description |
---|---|---|
market | string | Unique market id. It is the base currency code followed by the quote currency code. See Market for possible options. |
at | integer | Unix timestamp of when ticker was updated |
open | string | Today's open price |
low | string | Today's low price |
high | string | Today's high price |
last | string | Most recent trade price |
vol | string | 24hr trading volume in base currency |
Get Order Book
Example Request
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get 'https://serve.net-cents.com/api/v1/order_book',
params: { market: 'btcusd' }, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://serve.net-cents.com/api/v1/order_book', params={
'market': 'btcusd'
}, headers = headers)
print r.json()
Example Response
{
"timestamp": 1543085871,
"bids": [
["5521.50", "0.75124819"],
["5519.25", "0.015"]
],
"asks": [
["5530.20", "0.395810"],
["5534.90", "0.2281"]
]
}
GET https://serve.net-cents.com/api/v1/order_book
Get depth or specified market.
Parameters
Name | Type | Required | Description |
---|---|---|---|
market | string | true | Unique market id. It is the base currency code followed by the quote currency code. See Market for possible options. |
limit | integer | false | Limit the number of returned price levels. Default to 100. |
Get Trade History
Example Request
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get 'https://serve.net-cents.com/api/v1/trade_history',
params: { market: 'btcusd' }, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://serve.net-cents.com/api/v1/trade_history', params={
'market': 'btcusd'
}, headers = headers)
print r.json()
Example Response
{
"id": 338251,
"price": "5321.0",
"volume": "0.15",
"funds": "798.15",
"market": "btccad",
"trend": "up",
"created_at": "2018-11-01T21:51:04Z"
}
GET https://serve.net-cents.com/api/v1/trade_history
Get recent trades on market, each trade is included only once. Trades are sorted in reverse creation order.
Parameters
Name | Type | Required | Description |
---|---|---|---|
market | string | true | Unique market id. It is the base currency code followed by the quote currency code. See Market for possible options. |
limit | integer | false | Limit the number of returned trades. |
timestamp | integer | false | An integer represents the seconds elapsed since Unix epoch. If set, only trades executed before the time will be returned. |
from | integer | false | Trade id. If set, only trades created after the trade will be returned. |
to | integer | false | Trade id. If set, only trades created before the trade will be returned. |
order_by | string | false | If set, returned trades will be sorted in the specified order. One of asc or desc |
Account info
Get Balances
GET https://serve.net-cents.com/api/v1/balances
Get all balances.
Example Response
[
{
"currency": "BTC",
"balance": "0.159834",
"locked": "0.015",
"available": "0.009834"
}
]
Response Schema
Name | Type |
---|---|
currency | string |
balance | string |
locked | string |
available | string |
Get Orders
GET https://serve.net-cents.com/api/v1/orders
Returns a list of your orders
Parameters
Name | Type | Required | Description |
---|---|---|---|
access_key | string | true | Access key. |
nonce | integer | true | Nonce is an integer represents the milliseconds elapsed since Unix epoch. |
signature | string | true | The signature of your request payload, generated using your secret key. |
market | string | true | Unique market id. It is the base currency code followed by the quote currency code. See Market for possible options. |
state | string | false | Filter orders by state. See State for possible options. |
limit | integer | false | Limit the number of returned orders. |
offset | integer | false | Specify the offset of paginated results. |
order_by | string | false | If set, returned orders will be sorted in specific order. |
Response Schema
Example Response
[
{
"id": 98440,
"side": "buy",
"ord_type": "limit",
"price": "5325.0",
"avg_price": "5321.0",
"state": "wait",
"market": "btccad",
"created_at": "2018-11-01T21:51:04Z",
"volume": "0.5",
"remaining_volume": "0.35",
"executed_volume": "0.15",
"trades_count": 1
}
]
Name | Type | Description |
---|---|---|
id | integer | Unique order id. |
side | string | Either 'sell' or 'buy'. |
ord_type | string | Type of order, either 'limit' or 'market'. |
price | string | Price per unit of base currency, in quote currency. Not present for market orders. |
avg_price | string | Average execution price, average of price in trades. |
state | string | One of 'wait', 'done', or 'cancel'. An order in 'wait' is an active order, waiting fulfillment; a 'done' order is an order fulfilled; 'cancel' means the order has been cancelled. |
market | string | Unique market id. It is the base currency code followed by the quote currency code. See Market for possible options. |
created_at | string | Order create time in iso8601 format. |
volume | string | The quantity of the order base currency when submitted |
remaining_volume | string | The remaining volume |
executed_volume | string | The executed volume |
trades_count | integer | Number of executed trades belonging to this order |
Get Order
Example Response
{
"id": 98440,
"side": "buy",
"ord_type": "limit",
"price": "5325.0",
"avg_price": "5321.0",
"state": "wait",
"market": "btccad",
"created_at": "2018-11-01T21:51:04Z",
"volume": "0.5",
"remaining_volume": "0.35",
"executed_volume": "0.15",
"trades_count": 1,
"trades": [
{
"id": 338251,
"price": "5321.0",
"volume": "0.15",
"funds": "798.15",
"market": "btccad",
"trend": "up",
"created_at": "2018-11-01T21:51:04Z",
"side": "bid",
"fee": "2.0",
"order_id": 98440
}
]
}
GET https://serve.net-cents.com/api/v1/order
Get individual order and associated trades by order id
Parameters
Name | Type | Required | Description |
---|---|---|---|
access_key | string | true | Access key. |
nonce | integer | true | Nonce is an integer represents the milliseconds elapsed since Unix epoch. |
signature | string | true | The signature of your request payload, generated using your secret key. |
id | integer | true | Unique order id. |
Get Trades
GET https://serve.net-cents.com/api/v1/trades
Get your executed trades. Trades are sorted in reverse creation order.
Parameters
Name | Type | Required | Description |
---|---|---|---|
access_key | string | true | Access key. |
nonce | integer | true | Nonce is an integer represents the milliseconds elapsed since Unix epoch. |
signature | string | true | The signature of your request payload, generated using your secret key. |
market | string | true | Unique market id. It is the base currency code followed by the quote currency code. See Market for possible options. |
limit | integer | false | Limit the number of returned trades. |
timestamp | integer | false | An integer represents the seconds elapsed since Unix epoch. If set, only trades executed before the time will be returned. |
from | integer | false | Trade id. If set, only trades created after the trade will be returned. |
to | integer | false | Trade id. If set, only trades created before the trade will be returned. |
order_by | string | false | If set, returned trades will be sorted in specific order. |
Response Schema
Example Response
[
{
"id": 338251,
"price": "5321.0",
"volume": "0.15",
"funds": "798.15",
"market": "btccad",
"trend": "up",
"created_at": "2018-11-01T21:51:04Z",
"side": "bid",
"fee": "2.0",
"order_id": 98440
}
]
Name | Type | Description |
---|---|---|
id | integer | Unique trade id. |
price | string | Unit price of trade execution |
volume | string | Amount of base currency traded |
funds | string | Amount of quote currency traded |
market | string | Unique market id. It is the base currency code followed by the quote currency code. See Market for possible options. |
trend | string | Identifies the incoming order that triggered the trade, up if triggered by buy, down if triggered by sell |
created_at | string | Trade create time in iso8601 format. |
side | string | Side of the order placed by the user, bid or ask |
fee | string | Fee in quote currency |
order_id | integer | Unique id of order that trade is associated with |
Trading
Create Order
Example Request
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
}
payload = {
market: 'btcusd',
side: 'buy',
volume: '3',
ord_type: 'limit',
price: '8515.25'
}
result = RestClient.post 'https://serve.net-cents.com/api/v1/orders',
payload, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://serve.net-cents.com/api/v1/orders', data={
'market': 'btcusd',
'side': 'buy',
'volume': '3',
'ord_type': 'limit',
'price': '8515.25'
}, headers = headers)
print r.json()
POST https://serve.net-cents.com/api/v1/orders
Create a buy/sell order
Parameters
Name | Type | Required | Description |
---|---|---|---|
access_key | string | true | Access key. |
nonce | integer | true | Nonce is an integer represents the milliseconds elapsed since Unix epoch. |
signature | string | true | The signature of your request payload, generated using your secret key. |
market | string | true | Unique market id. It is the base currency code followed by the quote currency code. See Market for possible options. |
side | string | true | Either 'sell' or 'buy'. |
volume | string | true | The quantity of the order base currency when submitted |
ord_type | string | true | Type of order, either 'limit' or 'market'. |
price | string | false | Price per unit of base currency, in quote currency. Required for limit orders. |
Response Schema
Example Response
{
"id": 98440,
"side": "buy",
"ord_type": "limit",
"price": "5325.0",
"avg_price": "5321.0",
"state": "wait",
"market": "btccad",
"created_at": "2018-11-01T21:51:04Z",
"volume": "0.5",
"remaining_volume": "0.35",
"executed_volume": "0.15",
"trades_count": 1
}
Name | Type | Description |
---|---|---|
id | integer | Unique order id. |
side | string | Either 'sell' or 'buy'. |
ord_type | string | Type of order, either 'limit' or 'market'. |
price | string | Price per unit of base currency, in quote currency. Not present for market orders. |
avg_price | string | Average execution price, average of price in trades. |
state | string | One of 'wait', 'done', or 'cancel'. An order in 'wait' is an active order, waiting fulfillment; a 'done' order is an order fulfilled; 'cancel' means the order has been cancelled. |
market | string | Unique market id. It is the base currency code followed by the quote currency code. See Market for possible options. |
created_at | string | Order create time in iso8601 format. |
volume | string | The quantity of the order base currency when submitted |
remaining_volume | string | The remaining volume |
executed_volume | string | The executed volume |
trades_count | integer | Number of executed trades belonging to this order |
Create Multiple Orders
Example Request
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
}
payload = {
market: 'btcusd',
orders: [
{
side: 'buy',
volume: '3',
ord_type: 'limit',
price: '8515.25'
}
]
}
result = RestClient.post 'https://serve.net-cents.com/api/v1/orders/multi',
payload, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://serve.net-cents.com/api/v1/orders/multi', data={
'market': 'btcusd',
'orders': [
{
'side': 'buy',
'volume': '3',
'ord_type': 'limit',
'price': '8515.25'
}
]
}, headers = headers)
print r.json()
Example Response
[
{
"id": 98440,
"side": "buy",
"ord_type": "limit",
"price": "5325.0",
"avg_price": "5321.0",
"state": "wait",
"market": "btccad",
"created_at": "2018-11-01T21:51:04Z",
"volume": "0.5",
"remaining_volume": "0.35",
"executed_volume": "0.15",
"trades_count": 1
}
]
POST https://serve.net-cents.com/api/v1/orders/multi
Create multiple buy/sell orders
Parameters
Name | Type | Required | Description |
---|---|---|---|
access_key | string | true | Access key. |
nonce | integer | true | Nonce is an integer represents the milliseconds elapsed since Unix epoch. |
signature | string | true | The signature of your request payload, generated using your secret key. |
market | string | true | Unique market id. It is the base currency code followed by the quote currency code. See Market for possible options. |
orders[side] | string | true | Either 'sell' or 'buy'. |
orders[volume] | string | true | The quantity of the order base currency when submitted |
orders[ord_type] | string | true | Type of order, either 'limit' or 'market'. |
orders[price] | string | false | Price per unit of base currency, in quote currency. Required for limit orders. |
Cancel Order
Example Request
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
}
result = RestClient.post 'https://serve.net-cents.com/api/v1/order/delete',
{id: 81510}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://serve.net-cents.com/api/v1/order/delete', data={
'id': 81510
}, headers = headers)
print r.json()
Example Response
{
"id": 98440,
"side": "buy",
"ord_type": "limit",
"price": "5325.0",
"avg_price": "5321.0",
"state": "wait",
"market": "btccad",
"created_at": "2018-11-01T21:51:04Z",
"volume": "0.5",
"remaining_volume": "0.35",
"executed_volume": "0.15",
"trades_count": 1
}
POST https://serve.net-cents.com/api/v1/order/delete
Cancel an order. Please note order cancellation is asynchronous and a successful response only indicates that a cancel has been requested.
Parameters
Name | Type | Required | Description |
---|---|---|---|
access_key | string | true | Access key. |
nonce | integer | true | Nonce is an integer represents the milliseconds elapsed since Unix epoch. |
signature | string | true | The signature of your request payload, generated using your secret key. |
id | integer | true | Unique order id. |
Clear Orders
Example Request
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
}
result = RestClient.post 'https://serve.net-cents.com/api/v1/orders/clear',
{market: 'btcusd', side: 'sell'}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://serve.net-cents.com/api/v1/orders/clear', data={
'market': 'btcusd', 'side': 'sell'
}, headers = headers)
print r.json()
Example Response
[
{
"id": 98440,
"side": "buy",
"ord_type": "limit",
"price": "5325.0",
"avg_price": "5321.0",
"state": "wait",
"market": "btccad",
"created_at": "2018-11-01T21:51:04Z",
"volume": "0.5",
"remaining_volume": "0.35",
"executed_volume": "0.15",
"trades_count": 1
}
]
POST https://serve.net-cents.com/api/v1/orders/clear
Cancel all my orders. Please note order cancellation is asynchronous and a successful response only indicates that a cancel has been requested.
Parameters
Name | Type | Required | Description |
---|---|---|---|
access_key | string | true | Access key. |
nonce | integer | true | Nonce is an integer represents the milliseconds elapsed since Unix epoch. |
signature | string | true | The signature of your request payload, generated using your secret key. |
side | string | false | If present, only sell orders (asks) or buy orders (bids) will be cancelled. |
market | string | false | If present, only orders on this market will be cancelled. |
Schemas
Market
{
"id": "btccad",
"name": "BTC / CAD",
"base_unit": "BTC",
"quote_unit": "CAD",
"base_precision": 8,
"quote_precision": 2
}
Name | Type | Description |
---|---|---|
id | string | Unique market id. It is the base currency code followed by the quote currency code. See Market for possible options. |
name | string | Market name as used in the UI |
base_unit | string | Currency code for the market base unit |
quote_unit | string | Currency code for the market quote unit |
base_precision | integer | Decimal precision for the base unit |
quote_precision | integer | Decimal precision for the quote unit |
Ticker
{
"market": "btccad",
"at": 1543338291,
"open": "5310.10",
"low": "5310.10",
"high": "5385.0",
"last": "5321.0",
"vol": "45.168"
}
Name | Type | Description |
---|---|---|
market | string | Unique market id. It is the base currency code followed by the quote currency code. See Market for possible options. |
at | integer | Unix timestamp of when ticker was updated |
open | string | Today's open price |
low | string | Today's low price |
high | string | Today's high price |
last | string | Most recent trade price |
vol | string | 24hr trading volume in base currency |
OrderBook
{
"timestamp": 1543085871,
"bids": [
["5521.50", "0.75124819"],
["5519.25", "0.015"]
],
"asks": [
["5530.20", "0.395810"],
["5534.90", "0.2281"]
]
}
Name | Type | Description |
---|---|---|
timestamp | integer | none |
bids | list | Array of price levels in the format [<price>, <volume>] |
asks | list | Array of price levels in the format [<price>, <volume>] |
Trade
{
"id": 338251,
"price": "5321.0",
"volume": "0.15",
"funds": "798.15",
"market": "btccad",
"trend": "up",
"created_at": "2018-11-01T21:51:04Z"
}
Name | Type | Description |
---|---|---|
id | integer | Unique trade id. |
price | string | Unit price of trade execution |
volume | string | Amount of base currency traded |
funds | string | Amount of quote currency traded |
market | string | Unique market id. It is the base currency code followed by the quote currency code. See Market for possible options. |
trend | string | Identifies the incoming order that triggered the trade, up if triggered by buy, down if triggered by sell |
created_at | string | Trade create time in iso8601 format. |
Account
{
"currency": "BTC",
"balance": "0.159834",
"locked": "0.015",
"available": "0.009834"
}
Name | Type | Description |
---|---|---|
currency | string | none |
balance | string | none |
locked | string | none |
available | string | none |
Order
{
"id": 98440,
"side": "buy",
"ord_type": "limit",
"price": "5325.0",
"avg_price": "5321.0",
"state": "wait",
"market": "btccad",
"created_at": "2018-11-01T21:51:04Z",
"volume": "0.5",
"remaining_volume": "0.35",
"executed_volume": "0.15",
"trades_count": 1
}
Name | Type | Description |
---|---|---|
id | integer | Unique order id. |
side | string | Either 'sell' or 'buy'. |
ord_type | string | Type of order, either 'limit' or 'market'. |
price | string | Price per unit of base currency, in quote currency. Not present for market orders. |
avg_price | string | Average execution price, average of price in trades. |
state | string | One of 'wait', 'done', or 'cancel'. An order in 'wait' is an active order, waiting fulfillment; a 'done' order is an order fulfilled; 'cancel' means the order has been cancelled. |
market | string | Unique market id. It is the base currency code followed by the quote currency code. See Market for possible options. |
created_at | string | Order create time in iso8601 format. |
volume | string | The quantity of the order base currency when submitted |
remaining_volume | string | The remaining volume |
executed_volume | string | The executed volume |
trades_count | integer | Number of executed trades belonging to this order |
OrderWithTrades
{
"id": 98440,
"side": "buy",
"ord_type": "limit",
"price": "5325.0",
"avg_price": "5321.0",
"state": "wait",
"market": "btccad",
"created_at": "2018-11-01T21:51:04Z",
"volume": "0.5",
"remaining_volume": "0.35",
"executed_volume": "0.15",
"trades_count": 1,
"trades": [
{
"id": 338251,
"price": "5321.0",
"volume": "0.15",
"funds": "798.15",
"market": "btccad",
"trend": "up",
"created_at": "2018-11-01T21:51:04Z",
"side": "bid",
"fee": "2.0",
"order_id": 98440
}
]
}
Name | Type | Description |
---|---|---|
id | integer | Unique order id. |
side | string | Either 'sell' or 'buy'. |
ord_type | string | Type of order, either 'limit' or 'market'. |
price | string | Price per unit of base currency, in quote currency. Not present for market orders. |
avg_price | string | Average execution price, average of price in trades. |
state | string | One of 'wait', 'done', or 'cancel'. An order in 'wait' is an active order, waiting fulfillment; a 'done' order is an order fulfilled; 'cancel' means the order has been cancelled. |
market | string | none |
created_at | string | Order create time in iso8601 format. |
volume | string | The quantity of the order base currency when submitted |
remaining_volume | string | The remaining volume |
executed_volume | string | The executed volume |
trades_count | integer | Number of executed trades belonging to this order |
trades | [UserTrade] | Associated trades |
UserTrade
{
"id": 338251,
"price": "5321.0",
"volume": "0.15",
"funds": "798.15",
"market": "btccad",
"trend": "up",
"created_at": "2018-11-01T21:51:04Z",
"side": "bid",
"fee": "2.0",
"order_id": 98440
}
Name | Type | Description |
---|---|---|
id | integer | Unique trade id. |
price | string | Unit price of trade execution |
volume | string | Amount of base currency traded |
funds | string | Amount of quote currency traded |
market | string | Unique market id. It is the base currency code followed by the quote currency code. See Market for possible options. |
trend | string | Identifies the incoming order that triggered the trade, up if triggered by buy, down if triggered by sell |
created_at | string | Trade create time in iso8601 format. |
side | string | Side of the order placed by the user, bid or ask |
fee | string | Fee in quote currency |
order_id | integer | Unique id of order that trade is associated with |
Currency
{
"symbol": "BTC",
"name": "Bitcoin",
"deposit_enabled": true,
"withdrawal_enabled": true
}
Name | Type |
---|---|
symbol | string |
name | string |
deposit_enabled | boolean |
withdrawal_enabled | boolean |
Enums
Market
Value |
---|
btcusd |
btccad |
btceur |
ethusd |
ethcad |
etheur |
ethbtc |
ltcusd |
ltccad |
ltceur |
ltcbtc |
xembtc |
bchusd |
bchcad |
bcheur |
bchbtc |
xvgbtc |
xvgeth |
xvgcad |
xvgeur |
xvgusd |
State
Value |
---|
wait |
done |
cancel |
Side
Value |
---|
sell |
buy |
Order type
Value |
---|
limit |
market |
Order by
Value |
---|
asc |
desc |