Skip to content

021ticker

haipo yang edited this page Apr 29, 2019 · 10 revisions

Acquire Market Statistics

  • Request description: Acquire real-time market data

  • Request type: GET

  • Signature required: No

  • Request Url: https://api.coinex.com/v1/market/ticker?market=BCHBTC

  • Request parameter:

    name type required description
    market String Yes See<API invocation description·market>
  • Return value description:

    name type description
    date String server time when returning
    last String latest price
    buy String buy 1
    buy_amount String buy 1 amount
    sell String sell 1
    sell_amount String sell 1 amount
    open String 24H open price
    high String 24H highest price
    low String 24H lowest price
    vol String 24H volume
  • Example:

# Request
GET https://api.coinex.com/v1/market/ticker?market=bchbtc
# Response
{
  "code": 0,
  "data": {
    "date": 1513865441609,  # server time when returning
    "ticker": {
      "buy": "10.00",           # buy 1
      "buy_amount": "10.00",    # buy 1 amount
      "open": "10",             # highest price
      "high": "10",             # highest price
      "last": "10.00",          # latest price 
      "low": "10",              # lowest price
      "sell": "10.00",          # sell 1
      "sell_amount": "0.78",    # sell 1 amount
      "vol": "110"              # 24H volume
    }
  },
  "message": "Ok"
}

Acquire All Market Data

  • Request description: acquire all market data

  • Request type: GET

  • Signature required: No

  • Request Url:https://api.coinex.com/v1/market/ticker/all

  • Request parameter: None

  • Return value description:

    name type description
    date String server time when returning
    buy String buy 1
    buy_amount String buy 1 amount
    high String 24H highest price
    last String latest price
    low String 24H lowest price
    sell String sell 1
    sell_amount String sell 1 amount
    vol String 24H volumn
  • Example:

# Request
GET https://api.coinex.com/v1/market/ticker/all
# Response
{
    "code": 0,
    "data": {
        "date": 1513865441609,
        "ticker": {
            "BCHBTC": {
                "buy": "0.222",
                "buy_amount": "0.1",
                "open": "0.2322211",
                "high": "0.2322211",
                "last": "0.2322211",
                "low": "0.222",
                "sell": "0.3522211",
                "sell_amount": "0.11",
                "vol": "2.01430624"
            },
        }
    },
    "message": "Ok"
}

HTTP API Introduction

Common API

Market API

Account API

Trading API

Margin API

Contract API

WebSocket API Introduction

Clone this wiki locally