NAV Navbar
shell python
申请API Key

简介

欢迎使用 NovaDAX API

NovaDAX 提供了一套强大安全的 API,旨在为用户提供更加快捷的安全的使用体验。

API 提供了查询行情、交易,查询交易记录、查询账户详情等服务。

NovaDAX 为用户提供简单易用的接口调用形式,并且 SDK 还在持续完善中。

准备说明

创建一个账户

如果您还没有账户,请点击此处注册成为 NovaDAX 账户,享受 NovaDAX 提供的优质服务。

生成 API 密钥

对于与 API 通信,必需创建 AccessKey 与 SecretKey 并按照接入说明中的描述接入。 您可以在登录后,点击右上方用户图标下的“API管理”来生成API密钥。

接入说明

公共接口

公共接口不需要认证。

私有接口

私有接口需要认证。

接入 URL

https://api.novadax.com

限制频率

签名说明

API 请求在通过 Internet 传输的过程中极有可能被篡改,为了确保请求未被更改,除(基础信息,行情数据)外的私有接口均必须使用您的 API Key 做签名认证,以校验参数或参数值在传输途中是否发生了更改。

一个合法的请求由以下几部分组成:

签名规则

GET 加密举例

1. 查询字符串为

queryStr = "name=姓名&cpf=123456&birthday=2017-08-01"

2. 将查询字符串 URL Encode 之后 按照 ASCII 码的顺序对参数名进行排序

sort(urlencode(queryStr)) // birthday=2017-08-01&cpf=123456&name=%E5%A7%93%E5%90%8D

3. 按{Request Method}\n{Request URL}\n{Sorted Query Parameters}\n{TimeStamp}的格式组成最终需要签名的字符串

signStr = "GET\n/v1/order/get\nbirthday=2017-08-01&cpf=123456&name=%E5%A7%93%E5%90%8D\n1564988445199"

4. 用上一步里生成的 "字符串" 和你的密钥 (Secret Key) 生成一个数字签名

sign = hmac_sha256(signStr, SecretKey)

5. 将AccesskeySignTimesStamp信息一同添加到指定的header中

request.header.add("X-Nova-Access-Key", AccessKey)

request.header.add("X-Nova-Signature", Sign)

request.header.add("X-Nova-Timestamp", TimeStamp)

POST 加密举例

1.请求体中Request Body的内容为

body = {"name":"姓名", "cpf":"123456", "birthday":"2017-08-01"} // MD5 后的值为 896b0797c6bdf52abf5cb18e2d776efe

2.将Request Body 中的的内容 MD5 之后按 {Request Method}\n{Request URL}\n{MD5 Request Body}\n{TimeStamp} 的规则进行拼接

signStr = "POST\n/v1/order/create\n896b0797c6bdf52abf5cb18e2d776efe\n1564988445199"

3. 用上一步里生成的 “字符串” 和你的密钥 (Secret Key) 生成一个数字签名

sign = hmac_sha256(signStr, SecretKey)

4. 将AccesskeySignTimesStamp信息一同添加到指定的 Header 中

request.header.add("X-Nova-Access-Key", AccessKey)

request.header.add("X-Nova-Signature", Sign)

request.header.add("X-Nova-Timestamp", TimeStamp)

响应格式

所有的接口返回都是 JSON 格式。在 JSON 最上层有几个表示请求状态和属性的字段:codedatamessage 实际的接口返回内容在 data 字段里。

成功请求的返回

{
    "code": "A10000""data": {...}"message": "Success"
}

异常请求的返回

{
    "code": "A99999""data": {...}"message": "fail."
}

返回内容将会是以下格式:

参数名称 数据类型 描述
code string 状态
message string 描述
data object 数据主体

响应字典

错误码 HTTP 状态码 消息 解释
A99999 500 Failed 系统服务异常
A10000 200 Success 请求成功
A10001 400 Params error 参数错误
A10002 404 Api not found 无相关API
A10003 403 Authentication failed 鉴权失败
A10004 429 Too many requests 请求频率过快
A10011 400 Symbol not exist 交易对不存在
A10012 400 Symbol not trading 交易对当前不交易
A10013 503 Symbol maintain 交易对维护
A30001 400 Order not found 订单未找到
A30002 400 Amount is too small 订单数量太小
A30003 400 Amount is invalid 订单数量无效(如精度问题)
A30004 400 Value is too small 订单金额大小
A30005 400 Value is invalid 订单金额无效
A30006 400 Price is invalid 订单价格无效
A30007 400 Insufficient balance 余额不足
A30008 400 Order finished 订单已结束
A30009 400 Order canceled 订单已取消
A30010 400 Order cancelling 订单正在取消中

常见问题

签名失败

SDK 与讲解

我们的 SDK 放在 GitHub 中,如果需要使用,请访问

更新记录

时间 接口 变动项目 解释
2019-08-01 XXX 新加 初始化接口
2019-09-18 withdrawcoin 新加 提币接口

基础信息

获取所有交易币对

返回所有支持的交易币对及相关信息

curl "https://api.novadax.com/v1/common/symbols"
from novadax import RequestClient as NovaClient

nova_client = NovaClient('your access key(optional)', 'your secret key(optional)')

result = nova_client.list_symbols()

print(result)

返回值

{
    "code": "A10000",
    "data": [
        {
            "symbol": "BTC_BRL",
            "baseCurrency": "BTC",
            "quoteCurrency": "BRL",
            "amountPrecision": 4,
            "pricePrecision": 2,
            "valuePrecision": 4,
            "minOrderAmount": "0.001",
            "minOrderValue": "5",
        },
        {
            "symbol": "ETH_BRL",
            "baseCurrency": "ETH",
            "quoteCurrency": "BRL",
            "amountPrecision": 4,
            "pricePrecision": 2,
            "valuePrecision": 4,
            "minOrderAmount": "0.01",
            "minOrderValue": "5"
        }
    ],
    "message": "Success"
}

请求地址

GET /v1/common/symbols

请求参数

此请求不需要入参

响应

字段名称 类型 描述
symbol string 交易对
baseCurrency string 交易货币币种
quoteCurrency string 计价货币币种
pricePrecision number 交易价格精度
amountPrecision number 交易数量精度
valuePrecision number 交易金额精度
minOrderAmount string 最小交易数量
minOrderValue string 最小交易金额

获取系统时间

返回服务器时间戳

curl "https://api.novadax.com/v1/common/timestamp"
from novadax import RequestClient as NovaClient

nova_client = NovaClient('your access key(optional)', 'your secret key(optional)')

result = nova_client.get_timestamp()

print(result)

返回值

{
    "code": "A10000",
    "data": 1565080348983,
    "message": "Success"
}

请求地址

GET /v1/common/timestamp

请求参数

此请求不需要入参

响应

时间戳

行情

获取全部 Ticker

返回所有币种的行情和24小时的聚合数据

curl 'https://api.novadax.com/v1/market/tickers'
from novadax import RequestClient as NovaClient

nova_client = NovaClient('your access key(optional)', 'your secret key(optional)')

result = nova_client.list_tickers()

print(result)

返回值

{
    "code": "A10000",
    "data": [
        {
            "ask": "34708.15",
            "baseVolume24h": "34.08241488",
            "bid": "34621.74",
            "high24h": "35079.77",
            "lastPrice": "34669.81",
            "low24h": "34330.64",
            "open24h": "34492.08",
            "quoteVolume24h": "1182480.09502814",
            "symbol": "BTC_BRL",
            "timestamp": 1571112216346
        }
    ],
    "message": "Success"
}

请求地址

GET /v1/market/tickers

请求参数

此请求不需要参数

响应

参数名 类型 描述
symbol string 币对名称
lastPrice string 最新成交价
bid string 买一价
ask string 卖一价
open24h string 24小时开盘价
high24h string 24小时最高价
low24h string 24小时最低价
baseVolume24h string 24小时成交量,按交易货币统计
quoteVolume24h string 24小时成交量,按计价货币统计
timestamp number 系统时间戳

获取币对 Ticker

返回单个币种行情和24小时的聚合数据

curl 'https://api.novadax.com/v1/market/ticker?symbol=BTC_BRL'
from novadax import RequestClient as NovaClient

nova_client = NovaClient('your access key(optional)', 'your secret key(optional)')

result = nova_client.get_ticker('BTC_BRL')

print(result)

返回值

{
    "code": "A10000",
    "data": {
        "ask": "34708.15",
        "baseVolume24h": "34.08241488",
        "bid": "34621.74",
        "high24h": "35079.77",
        "lastPrice": "34669.81",
        "low24h": "34330.64",
        "open24h": "34492.08",
        "quoteVolume24h": "1182480.09502814",
        "symbol": "BTC_BRL",
        "timestamp": 1571112216346
    },
    "message": "Success"
}

请求地址

GET /v1/market/ticker

请求参数

字段名称 是否必填 类型 描述
symbol string 交易对

响应

参数名 类型 描述
symbol string 币对名称
lastPrice string 最新成交价
bid string 买一价
ask string 卖一价
open24h string 24小时开盘价
high24h string 24小时最高价
low24h string 24小时最低价
baseVolume24h string 24小时成交量,按交易货币统计
quoteVolume24h string 24小时成交量,按计价货币统计
timestamp number 系统时间戳

获取深度数据

返回未聚合的原始深度数据

curl 'https://api.novadax.com/v1/market/depth?symbol=BTC_BRL&limit=10'
from novadax import RequestClient as NovaClient

nova_client = NovaClient('your access key(optional)', 'your secret key(optional)')

result = nova_client.get_depth('BTC_BRL', limit = 10)

print(result)

返回值

{
    "code": "A10000",
    "data": {
        "asks": [
            ["43687.16", "0.5194"],
            ["43687.2", "1.3129"]
        ],
        "bids": [
            ["43657.57", "0.6135"],
            ["43657.46", "0.0559"]
        ],
        "timestamp": 1565057338020
    },
    "message": "Success"
}

请求地址

GET /v1/market/depth

请求参数

字段名称 是否必填 类型 描述
symbol string 交易对
limit number 条数限制,最多20条

响应

字段名称 类型 描述
asks array 卖集合
asks[][0] string 卖的价格
asks[][1] string 卖的数量
bids array 买集合
bids[][0] string 买的价格
bids[][1] string 买的数量
timestamp number 时间戳

获取成交数据

返回此币对的历史成交数据

curl 'https://api.novadax.com/v1/market/trades?symbol=BTC_BRL&limit=10'
from novadax import RequestClient as NovaClient

nova_client = NovaClient('your access key(optional)', 'your secret key(optional)')

result = nova_client.list_trades('BTC_BRL', limit = 10)

print(result)

返回值

{
    "code": "A10000",
    "data": [
        {
            "price": "43657.57",
            "amount": "1",
            "side": "SELL",
            "timestamp": 1565007823401
        },
        {
            "price": "43687.16",
            "amount": "0.071",
            "side": "BUY",
            "timestamp": 1565007198261
        }
    ],
    "message": "Success"
}

请求地址

GET /v1/market/trades

请求参数

字段名称 是否必填 类型 描述
symbol string 交易对
limit number 条数限制,最多100条

响应

字段名称 类型 描述
price string 成交价格
amount string 成交数量
side string 成交方向,可能值:BUY、SELL
timestamp number 成交时间戳

订单

下限价买单

创建一笔新的限价买订单

curl -X POST \
  'https://api.novadax.com/v1/orders/create' \
  -H 'Content-Type: application/json' \
  -H 'X-Nova-Access-Key: your access key' \
  -H 'X-Nova-Signature: signature' \
  -H 'X-Nova-Timestamp: timestamp now' \
  -d '{
    "symbol": "BTC_BRL",
    "type": "LIMIT",
    "side": "BUY",
    "price": "35000.00",
    "amount": "0.001"
  }'
from novadax import RequestClient as NovaClient

nova_client = NovaClient('your access key', 'your secret key')

result = nova_client.create_order('BTC_BRL', 'LIMIT', 'BUY', price = '35000.00', amount = '0.001')

print(result)

返回值

{
    "code": "A10000",
    "data": {
        "amount": "0.001",
        "averagePrice": null,
        "filledAmount": "0",
        "filledFee": "0",
        "filledValue": "0",
        "id": "633679992971251712",
        "price": "35000",
        "side": "BUY",
        "status": "PROCESSING",
        "symbol": "BTC_BRL",
        "timestamp": 1571122683535,
        "type": "LIMIT",
        "value": "35"
    },
    "message": "Success"
}

请求地址

POST /v1/orders/create

请求参数

字段名称 是否必填 类型 描述
symbol string 交易对,例如 BTC_BRL
type string 订单类型,固定值 LIMIT
side string 订单方向,固定值 BUY
amount string 交易数量
price string 交易价格

响应

字段名称 类型 描述
id string 订单ID
symbol string 交易对
type string 订单类型
side string 订单方向
price string 订单价格
averagePrice string 平均订单价格
amount string 订单数量
filledAmount string 订单中已成交的数量
value string 订单金额
filledValue string 订单中已成交的金额
filledFeefilledFee string 已成交的手续费
status string 订单状态,可能值:SUBMITTED、PROCESSING、PARTIAL_FILLED、CANCELING、FILLED、CANCELED、REJECTED
timestamp number 订单创建时间戳

下限价卖单

创建一笔新的限价卖订单

curl -X POST \
  'https://api.novadax.com/v1/orders/create' \
  -H 'Content-Type: application/json' \
  -H 'X-Nova-Access-Key: your access key' \
  -H 'X-Nova-Signature: signature' \
  -H 'X-Nova-Timestamp: timestamp now' \
  -d '{
    "symbol": "BTC_BRL",
    "type": "LIMIT",
    "side": "SELL",
    "price": "35000.00",
    "amount": "0.001"
  }'
from novadax import RequestClient as NovaClient

nova_client = NovaClient('your access key', 'your secret key')

result = nova_client.create_order('BTC_BRL', 'LIMIT', 'SELL', price = '35000.00', amount = '0.001')

print(result)

返回值

{
    "code": "A10000",
    "data": {
        "amount": "0.001",
        "averagePrice": null,
        "filledAmount": "0",
        "filledFee": "0",
        "filledValue": "0",
        "id": "633680805433102336",
        "price": "35000",
        "side": "SELL",
        "status": "PROCESSING",
        "symbol": "BTC_BRL",
        "timestamp": 1571122877244,
        "type": "LIMIT",
        "value": "35"
    },
    "message": "Success"
}

请求地址

POST /v1/orders/create

请求参数

字段名称 是否必填 类型 描述
symbol string 交易对,例如 BTC_BRL
type string 订单类型,固定值 LIMIT
side string 订单方向,固定值 SELL
amount string 交易数量
price string 交易价格

响应

字段名称 类型 描述
id string 订单ID
symbol string 交易对
type string 订单类型
side string 订单方向
price string 订单价格
averagePrice string 平均订单价格
amount string 订单数量
filledAmount string 订单中已成交的数量
value string 订单金额
filledValue string 订单中已成交的金额
filledFeefilledFee string 已成交的手续费
status string 订单状态,可能值:SUBMITTED、PROCESSING、PARTIAL_FILLED、CANCELING、FILLED、CANCELED、REJECTED
timestamp number 订单创建时间戳

下市价买单

创建一笔新的市价买订单

curl -X POST \
  'https://api.novadax.com/v1/orders/create' \
  -H 'Content-Type: application/json' \
  -H 'X-Nova-Access-Key: your access key' \
  -H 'X-Nova-Signature: signature' \
  -H 'X-Nova-Timestamp: timestamp now' \
  -d '{
    "symbol": "BTC_BRL",
    "type": "MARKET",
    "side": "BUY",
    "value": "10.00"
  }'
from novadax import RequestClient as NovaClient

nova_client = NovaClient('your access key', 'your secret key')

result = nova_client.create_order('BTC_BRL', 'MARKET', 'BUY', value = '10.00')

print(result)

返回值

{
    "code": "A10000",
    "data": {
        "amount": null,
        "averagePrice": null,
        "filledAmount": "0",
        "filledFee": "0",
        "filledValue": "0",
        "id": "633681498843828224",
        "price": null,
        "side": "BUY",
        "status": "PROCESSING",
        "symbol": "BTC_BRL",
        "timestamp": 1571123042566,
        "type": "MARKET",
        "value": "10"
    },
    "message": "Success"
}

请求地址

POST /v1/orders/create

请求参数

字段名称 是否必填 类型 描述
symbol string 交易对,例如 BTC_BRL
type string 订单类型,固定值 MARKET
side string 订单方向,固定值 BUY
value string 交易金额

响应

字段名称 类型 描述
id string 订单ID
symbol string 交易对
type string 订单类型
side string 订单方向
price string 订单价格
averagePrice string 平均订单价格
amount string 订单数量
filledAmount string 订单中已成交的数量
value string 订单金额
filledValue string 订单中已成交的金额
filledFeefilledFee string 已成交的手续费
status string 订单状态,可能值:SUBMITTED、PROCESSING、PARTIAL_FILLED、CANCELING、FILLED、CANCELED、REJECTED
timestamp number 订单创建时间戳

下市价卖单

创建一笔新市价卖订单

curl -X POST \
  'https://api.novadax.com/v1/orders/create' \
  -H 'Content-Type: application/json' \
  -H 'X-Nova-Access-Key: your access key' \
  -H 'X-Nova-Signature: signature' \
  -H 'X-Nova-Timestamp: timestamp now' \
  -d '{
    "symbol": "BTC_BRL",
    "type": "MARKET",
    "side": "SELL",
    "amount": "0.001"
  }'
from novadax import RequestClient as NovaClient

nova_client = NovaClient('your access key', 'your secret key')

result = nova_client.create_order('BTC_BRL', 'MARKET', 'SELL', amount = '0.001')

print(result)

返回值

{
    "code": "A10000",
    "data": {
        "amount": "0.001",
        "averagePrice": null,
        "filledAmount": "0",
        "filledFee": "0",
        "filledValue": "0",
        "id": "633682053058187264",
        "price": null,
        "side": "SELL",
        "status": "PROCESSING",
        "symbol": "BTC_BRL",
        "timestamp": 1571123174702,
        "type": "MARKET",
        "value": null
    },
    "message": "Success"
}

请求地址

POST /v1/orders/create

请求参数

字段名称 是否必填 类型 描述
symbol string 交易对,例如 BTC_BRL
type string 订单类型,固定值 MARKET
side string 订单方向,固定值 SELL
amount string 交易数量

响应

字段名称 类型 描述
id string 订单ID
symbol string 交易对
type string 订单类型
side string 订单方向
price string 订单价格
averagePrice string 平均订单价格
amount string 订单数量
filledAmount string 订单中已成交的数量
value string 订单金额
filledValue string 订单中已成交的金额
filledFeefilledFee string 已成交的手续费
status string 订单状态,可能值:SUBMITTED、PROCESSING、PARTIAL_FILLED、CANCELING、FILLED、CANCELED、REJECTED
timestamp number 订单创建时间戳

撤销订单

提交订单撤销请求

curl -X POST \
  'https://api.novadax.com/v1/orders/cancel' \
  -H 'Content-Type: application/json' \
  -H 'X-Nova-Access-Key: your access key' \
  -H 'X-Nova-Signature: signature' \
  -H 'X-Nova-Timestamp: timestamp now' \
  -d '{
    "id": "608705793440616448"
  }'
from novadax import RequestClient as NovaClient

nova_client = NovaClient('your access key', 'your secret key')

result = nova_client.cancle_order("608705793440616448")

print(result)

返回值

{
    "code": "A10000",
    "data": {
        "result": true
    },
    "message": "Success"
}

请求地址

POST /v1/orders/cancel

请求参数

字段名称 是否必填 类型 描述
id string 订单ID

响应

字段名称 类型 描述
result string 撤销请求提交结果

查询订单详情

查询订单最新状态和详情

curl -X GET \
  'https://api.novadax.com/v1/orders/get?id=608695623247466496' \
  -H 'X-Nova-Access-Key: your access key' \
  -H 'X-Nova-Signature: signature' \
  -H 'X-Nova-Timestamp: timestamp now'
from novadax import RequestClient as NovaClient

nova_client = NovaClient('your access key', 'your secret key')

result = nova_client.get_order('608695623247466496')

print(result)

返回值

{
    "code": "A10000",
    "data": {
        "id": "608695623247466496",
        "symbol": "BTC_BRL",
        "type": "MARKET",
        "side": "SELL",
        "price": null,
        "averagePrice": "0",
        "amount": "0.123",
        "filledAmount": "0",
        "value": null,
        "filledValue": "0",
        "filledFee": "0",
        "status": "REJECTED",
        "timestamp": 1565165945588
    },
    "message": "Success"
}

请求地址

GET /v1/orders/get

请求参数

字段名称 是否必填 类型 描述
id string 订单ID

响应

字段名称 类型 描述
id string 订单ID
symbol string 交易对
type string 订单类型,可能值:LIMIT、MARKET、MAKER_ONLY
side string 订单方向,可能值:BUY、SELL
price string 订单价格
averagePrice string 平均订单价格
amount string 订单数量
filledAmount string 订单中已成交的数量
value string 订单金额
filledValue string 订单中已成交的金额
filledFeefilledFee string 已成交的手续费
status string 订单状态,可能值:SUBMITTED、PROCESSING、PARTIAL_FILLED、CANCELING、FILLED、CANCELED、REJECTED
timestamp number 订单创建时间戳

查询历史订单

基于指定条件查询历史订单

curl -X GET \
  'https://api.novadax.com/v1/orders/list?symbol=BTC_BRL&status=FINISHED&fromId=608705793440616448&toId=608694995137859584&limit=100' \
  -H 'X-Nova-Access-Key: your access key' \
  -H 'X-Nova-Signature: signature' \
  -H 'X-Nova-Timestamp: timestamp now'
from novadax import RequestClient as NovaClient

nova_client = NovaClient('your access key', 'your secret key')

result = nova_client.list_orders('BTC_BRL', status = 'FINISHED', from_id = '608705793440616448', to_id = '608694995137859584', limit = '100')

print(result)

返回值

{
    "code": "A10000",
    "data": [
        {
            "id": "608695678650028032",
            "symbol": "BTC_BRL",
            "type": "MARKET",
            "side": "SELL",
            "price": null,
            "averagePrice": "0",
            "amount": "0.123",
            "filledAmount": "0",
            "value": null,
            "filledValue": "0",
            "filledFee": "0",
            "status": "REJECTED",
            "timestamp": 1565165958796
        },
        {
            "id": "608695623247466496",
            "symbol": "BTC_BRL",
            "type": "MARKET",
            "side": "SELL",
            "price": null,
            "averagePrice": "0",
            "amount": "0.123",
            "filledAmount": "0",
            "value": null,
            "filledValue": "0",
            "filledFee": "0",
            "status": "REJECTED",
            "timestamp": 1565165945588
        }
    ],
    "message": "Success"
}

请求地址

GET /v1/orders/list

请求参数

字段名称 是否必填 类型 描述
symbol string 交易对,例如BTC_BRL
status string 订单状态,可选值:SUBMITTED、PROCESSING、PARTIAL_FILLED、CANCELING、FILLED、CANCELED、REJECTED,多个状态可用逗号分割
fromId string 从指定订单开始
toId string 从指定订单结束
fromTimestamp number 从指定时间开始,以订单创建时间查询,使用毫秒时间戳
toTimestamp number 从指定时间结束,以订单创建时间查询,使用毫秒时间戳
limit string 返回条数

响应

字段名称 类型 描述
id string 订单ID
symbol string 交易对
type string 订单类型,可能值:LIMIT、MARKET、MAKER_ONLY
side string 订单方向,可能值:BUY、SELL
price string 订单价格
averagePrice string 平均订单价格
amount string 订单数量
filledAmount string 订单中已成交的数量
value string 订单金额
filledValue string 订单中已成交的金额
filledFeefilledFee string 已成交的手续费
status string 订单状态,可能值:SUBMITTED、PROCESSING、PARTIAL_FILLED、CANCELING、FILLED、CANCELED、REJECTED
timestamp number 订单创建时间戳

查询订单成交明细

查询指定订单的成交明细

curl -X GET \
  'https://api.novadax.com/v1/orders/fill?id=608716957545402368' \
  -H 'X-Nova-Access-Key: your access key' \
  -H 'X-Nova-Signature: signature' \
  -H 'X-Nova-Timestamp: timestamp now'
from novadax import RequestClient as NovaClient

nova_client = NovaClient('your access key', 'your secret key')

result = nova_client.list_order_fills('608716957545402368')

print(result)

返回值

{
    "code": "A10000",
    "data": [
        {
            "id": "608717046691139584",
            "orderId": "608716957545402368",
            "symbol": "BTC_BRL",
            "side": "BUY",
            "amount": "0.0988",
            "price": "45514.76",
            "fee": "0.0000988 BTC",
            "role": "MAKER",
            "timestamp": 1565171053345
        },
        {
            "id": "608717065729085441",
            "orderId": "608716957545402368",
            "symbol": "BTC_BRL",
            "side": "BUY",
            "amount": "0.0242",
            "price": "45514.76",
            "fee": "0.0000242 BTC",
            "role": "MAKER",
            "timestamp": 1565171057882
        }
    ],
    "message": "Success"
}

请求地址

GET /v1/orders/fill

请求参数

字段名称 是否必填 类型 描述
id string 订单ID

响应

字段名称 类型 描述
id string 成交ID
orderId string 订单ID
symbol string 交易对
side string 交易方向,可能值:BUY、SELL
price string 成交价格
amount string 成交数量
fee string 成交手续费
role string 成交角色,可能值:TAKER、MAKER

账户

获取账户余额

查询账户的余额

curl 'https://api.novadax.com/v1/account/getBalance'
from novadax import RequestClient as NovaClient

nova_client = NovaClient('your access key', 'your secret key')

result = nova_client.get_account_balance()

print(result)

返回值

{
    "code": "A10000",
    "data": [
        {
            "available": "1.23",
            "balance": "0.23",
            "currency": "BTC",
            "hold": "1"
        }
    ],
    "message": "Success"
}

请求地址

GET /v1/account/getBalance

请求参数

此请求不需要参数

响应

参数名 类型 描述
currency string 币种名称
balance string 余额
hold string 冻结余额
available string 可用余额
accountId string 账户ID

提币

curl -X POST \
  'https://api.novadax.com/v1/account/withdraw/coin' \
  -H 'Content-Type: application/json' \
  -H 'X-Nova-Access-Key: your access key' \
  -H 'X-Nova-Signature: signature' \
  -H 'X-Nova-Timestamp: timestamp now' \
  -d '{
    "code": "BTC",
    "amount": "1",
    "wallet": "your to_address"
  }'
from novadax import RequestClient as NovaClient

nova_client = NovaClient('your access key', 'your secret key')

result = nova_client.withdraw_coin("BTC","1",'...')

print(result)

返回值

{
  "code":"A10000",
  "data": "DR123",
  "message":"Success"
}

请求地址

POST /v1/account/withdraw/coin

请求参数

字段名称 是否必填 类型 描述
code string 币种,例如BTC
amount string 提币金额
wallet string 提币地址
tag string 提币标签; XLM、XRP、EOS提币时必填

响应

data 字段返回提币订单号