NAV Navbar
http
  • Overview
  • Chart
  • Wallet [Auth]
  • Trading [Auth]
  • Funding [Auth]
  • Market
  • System
  • WebSocket [Deprecated]
  • Websocket V2
  • Overview

    COBINHOOD RESTful API URL: https://api.cobinhood.com

    COBINHOOD WebSocket API URL: wss://feed.cobinhood.com/ws [Will be removed in June, 2018] COBINHOOD WebSocket V2 API URL: wss://ws.cobinhood.com/v2/ws

    HTTP Request Headers

    nonce for 'POST' 'UPDATE' 'DELETE'. Accept nonce in millisecond unix time format. ex: 1518166662197 authorization for APIs that require authentication, value should be the API key token you obtain from the API key page in COBINHOOD exchange.

    Timestamps

    All timestamps exchanged between client and server are based on server Unix UTC timestamp. Please refer to System Module for retrieving server timestamp.

    Floating Point Values

    All floating point values in responses are encoded in string type to avoid loss of precision.

    Authentication

    COBINHOOD uses token for APIs that require authentication. Token header field name is authorization. The JWT can be generated and revoked on COBINHOOD exchange API console page.

    Successful API Response

    {
        "success": true,
        "result": {
            "<object name>": {
                ...
            }
        }
    }
    

    All responses from API contain a JSON object field named result:

    A successful response should have HTTP status codes ranging from 100 to 399, and a boolean success field with value true. Clients should find the response as a JSON object within the result object, containing the name of the requested object as the key:

    Unsuccessful Response

    {
        "success": false,
        "error": {
            "error_code": "error_code_string"
        }
    }
    

    An unsuccessful response would result in HTTP status codes ranging from 400 to 599, and a boolean success field with value false. If success is false, an error object member containing information that describes the error can be found in the root object:

    Rate-limiting

    All API requests are rate-limited.

    Custom Query & Pagination

    APIs equipped with custom query functionality enable users to query with different filter, order, limit and page.

    Query Parameters

    Filter

    Ex. 1: Where column_a = 'A'

    {
        "equal": {
            "column": "column_a",
            "value": "A"
        }
    }
    

    Ex. 2: Where ((column_a = 'A') AND (column_b != 'B'))

    {
        "and": [
            {
                "equal": {
                    "column": "column_a",
                    "value": "A"
                }
            },{
                "not_equal": {
                    "column": "column_b",
                    "value": "A"
                }
            }
        ]
    }
    

    Pass the JSON stringified object as the filter query parameter in url to filter the queried data. Filter object is a nested JSON object that will be evaluated to Where arguments in a SQL query. Each layer is a single-key map, with operator as the key and parameters as the value. There are two kinds of filters (operators), comparison filters and logic filters. Comparison filter is the atomic element of a filter and logic filter is to combine multiple filters into one single filter.

    The allowed column, values and operators can differ in APIs according to different use cases.

    Comparison Operators:

    Logic Operators:

    Order

    Pass the JSON stringified JSON array as the order query parameter in url to order the queried data. Order array will be evaluated to ORDER BY arguments in a SQL query. Each element is a order object with column to order by and the order keyword(asc|desc).

    The allowed column, values and operators can differ in APIs according to different use cases.

    Ex. ORDER BY column_a ASC

    [
        {
            "column":"column_a",
            "keyword":"asc"
        }
    ]
    

    Pagination

    Pass limit and page query parameter to specify the pagination. Page starts from 1 and the maximum limit is 100

    Chart

    Get Candle

    /v1/chart/candles/:trading_pair_id [GET]

    returns candle of given trading pair, timeframe, time range.

    Path Parameters

    Query Parameters

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": {
            "candles": [
                {
                    "timeframe": "1h",
                    "trading_pair_id": "COB-BTC",
                    "timestamp": 1521280800000,
                    "volume": "59775.03494641",
                    "open": "0.00001138",
                    "close": "0.00001143",
                    "high": "0.00001151",
                    "low": "0.00001118"
                }
            ]
        }
    }
    
    

    Wallet [Auth]

    Get Balances

    /v1/wallet/balances [GET]

    Get currencies, amounts, types, status of balances.

    Query Parameters

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": {
            "balances": [
                {
                    "currency": "ETH",
                    "type": "exchange",
                    "total": "1.2",
                    "on_order": "0",
                    "locked": false,
                    "usd_value": "866.0784",
                    "btc_value": "0.06095616"
                }
            ]
        }
    }
    
    

    Get All Generic Deposits

    /v1/wallet/generic_deposits [GET]

    Get informations for generic deposits. This endnpoint is equipped with custom-query.

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": {
            "generic_deposits": [
                {
                   "id": "ac7a286d-8524-435c-9606-0453a620fe52",
                   "is_cancelled": false,
                   "type": "deposit_type_internal_transfer",
                   "user_id": "e28cd9d9-3121-48f5-aec1-dc82161f2e5d",
                   "currency_id": "SHPING",
                   "ledger_type": "exchange",
                   "description": "Internal transfer [0xd47ed407b54f4124f90f9e09bbd1f981ddfc7e4fd201e9fc6bea5008b2c3987e]. Slot machine reward SHPING.",
                   "amount": "1",
                   "fee": "0",
                   "created_at": 1526355806190,
                   "completed_at": 1526355806208,
                   "status": "tx_confirmed",
                   "additional_info": {
                       "tx_hash": "d47ed407b54f4124f90f9e09bbd1f981ddfc7e4fd201e9fc6bea5008b2c3987e"
                   }
                },
                {
                   "id": "ac7a286d-8524-435c-9606-0453a620fe53",
                   "is_cancelled": false,
                   "type": "deposit_type_blockchain",
                   "user_id": "e28cd9d9-3121-48f5-aec1-dc82161f2e5d",
                   "currency_id": "BTC",
                   "ledger_type": "coblet",
                   "description": "",
                   "amount": "0.1",
                   "fee": "0",
                   "created_at": 1526355806190,
                   "completed_at": 1526355806208,
                   "status": "tx_confirmed",
                   "additional_info": {
                       "tx_hash": "d47ed407b54f4124f90f9e09ddb1f981ddfc7e4fd201e9fc6bea5008b2c3987e"
                   }
                }
            ]
        }
    }
    
    

    Get Generic Deposit

    /v1/wallet/generic_deposits/:generic_deposit_id [GET]

    Get information for a single generic deposit.

    Path Parameters

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": {
            "generic_deposit": {
                "id": "ac7a286d-8524-435c-9606-0453a620fe52",
                "is_cancelled": false,
                "type": "deposit_type_internal_transfer",
                "user_id": "e28cd9d9-3121-48f5-aec1-dc82161f2e5d",
                "currency_id": "SHPING",
                "ledger_type": "exchange",
                "description": "Internal transfer [0xd47ed407b54f4124f90f9e09bbd1f981ddfc7e4fd201e9fc6bea5008b2c3987e]. Slot machine reward SHPING.",
                "amount": "1",
                "fee": "0",
                "created_at": 1526355806190,
                "completed_at": 1526355806208,
                "status": "tx_confirmed",
                "additional_info": {
                    "tx_hash": "d47ed407b54f4124f90f9e09bbd1f981ddfc7e4fd201e9fc6bea5008b2c3987e"
                }
            }
        }
    }
    
    

    Get All Generic Withdrawals

    /v1/wallet/generic_withdrawals [GET]

    Get informations for generic withdrawals. This endnpoint is equipped with custom-query.

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": {
            "generic_withdrawals": [
                {
                    "id": "2560c791-f874-4abd-bb40-647b2d38ef71",
                    "is_cancelled": false,
                    "type": "withdrawal_type_internal_transfer",
                    "user_id": "e28cd9d9-3121-48f5-aec1-dc82161f2e5d",
                    "currency_id": "COB",
                    "ledger_type": "exchange",
                    "description": "Internal transfer [0x304a396347cdf858bd3ce7337f061b5de04788d16b19d105d77816301614c1ef]. Prize redemption of 10 COB",
                    "amount": "10",
                    "approval_motion_id": null,
                    "created_at": 1526020394504,
                    "completed_at": 1526020394523,
                    "status": "tx_confirmed",
                    "additional_info": {
                        "tx_hash": "304a396347cdf858bd3ce7337f061b5de04788d16b19d105d77816301614c1ef"
                    }
                },
                {
                    "id": "2560d791-f874-4abd-bb40-647b2d38ef71",
                    "is_cancelled": false,
                    "type": "withdrawal_type_blockchain",
                    "user_id": "e28cd9d9-3121-48f5-aec1-dc82161f2e5d",
                    "currency_id": "ETH",
                    "ledger_type": "coblet",
                    "description": "",
                    "amount": "0.1",
                    "approval_motion_id": null,
                    "created_at": 1526020394504,
                    "completed_at": 1526020394523,
                    "status": "tx_confirmed",
                    "additional_info": {
                        "tx_hash": "304a396347cdf858bd3ce7337f061c5be04788d16b19d105d77816301614c1ef"
                    }
                }
            ]
        }
    }
    
    

    Get Generic Withdrawal

    /v1/wallet/generic_withdrawals/:generic_withdrawal_id [GET]

    Get infomation for a single generic withdrawal.

    Path Parameters

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": {
            "generic_withdrawal": {
                "id": "2560c791-f874-4abd-bb40-647b2d38ef71",
                "is_cancelled": false,
                "type": "withdrawal_type_internal_transfer",
                "user_id": "e28cd9d9-3121-48f5-aec1-dc82161f2e5d",
                "currency_id": "COB",
                "ledger_type": "exchange",
                "description": "Internal transfer [0x304a396347cdf858bd3ce7337f061b5de04788d16b19d105d77816301614c1ef]. Prize redemption of 10 COB",
                "amount": "10",
                "approval_motion_id": null,
                "created_at": 1526020394504,
                "completed_at": 1526020394523,
                "status": "tx_confirmed",
                "additional_info": {
                    "tx_hash": "304a396347cdf858bd3ce7337f061b5de04788d16b19d105d77816301614c1ef"
                }
            }
        }
    }
    
    

    Get Ledger Entries

    /v1/wallet/ledger [GET]

    Get balance change logs. Pagination is supported.

    Query Parameters

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": {
            "limit": 50,
            "page": 1,
            "total_page": 1,
            "total_count": 100,
            "ledger": [
                {
                    "timestamp": "2018-04-26T03:43:43.051255Z",
                    "currency": "COB",
                    "type": "exchange",
                    "action": "fixup",
                    "amount": "22000",
                    "balance": "22199.32393872",
                    "description": "",
                    "sequence": 0,
                    "trade_id": null,
                    "loan_id": null,
                    "deposit_id": null,
                    "withdrawal_id": null,
                    "fiat_deposit_id": null,
                    "fiat_withdrawal_id": null
                },
                {
                    "timestamp": "2018-04-23T06:55:22.990024Z",
                    "currency": "COB",
                    "type": "exchange",
                    "action": "withdrawal_fee",
                    "amount": "-38.95",
                    "balance": "199.32393872",
                    "description": "",
                    "sequence": 0,
                    "trade_id": null,
                    "loan_id": null,
                    "deposit_id": null,
                    "withdrawal_id": null,
                    "fiat_deposit_id": null,
                    "fiat_withdrawal_id": null
                },
                {
                    "timestamp": "2018-04-23T06:55:22.975023Z",
                    "currency": "COB",
                    "type": "exchange",
                    "action": "withdraw",
                    "amount": "-639.05",
                    "balance": "238.27393872",
                    "description": "",
                    "sequence": 0,
                    "trade_id": null,
                    "loan_id": null,
                    "deposit_id": null,
                    "withdrawal_id": null,
                    "fiat_deposit_id": null,
                    "fiat_withdrawal_id": null
                }
            ]
        }
    }
    
    

    Transfer Balance Between Wallets

    /v1/wallet/transfer [POST]

    Transfer balance between different types of wallets.

    Request

    Payload

    {
        "from": "exchange",
        "to": "margin",
        "currency": "COB",
        "amount": "0.1"
    }
    
    

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": null
    }
    
    

    Trading [Auth]

    Check Order

    /v1/trading/check_order [POST]

    Check conditional order will be executed immediately.

    Request

    Payload

    {
        "trading_pair_id": "BTC-USDT",
        "side": "bid",
        "type": "limit_stop",
        "stop_price": "5000.01000000"
    }
    
    

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": {
            "may_execute_immediately": true
        }
    }
    
    

    Get Order History

    /v1/trading/order_history [GET]

    Get historical orders.

    Query Parameters

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": {
            "orders": [
                {
                    "id": "8850805e-d783-46ec-9af5-30712035e760",
                    "trading_pair_id": "COB-ETH",
                    "side": "bid",
                    "type": "limit",
                    "price": "0.0001195",
                    "size": "212",
                    "filled": "212",
                    "state": "filled",
                    "timestamp": 1526018972869,
                    "eq_price": "0.0001194999996323",
                    "completed_at": "2018-05-11T06:09:38.946678Z",
                    "source": "exchange"
                }
            ]
        }
    }
    
    

    Place Order

    /v1/trading/orders [POST]

    Place an order.

    Request

    Payload

    {
        "trading_pair_id": "BTC-USDT",
        "side": "bid",
        "type": "limit",
        "price": "5000.01000000",
        "size": "1.0100"
    }
    
    

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": {
            "order": {
                "id": "8850805e-d783-46ec-9af5-30712035e760",
                "trading_pair_id": "COB-ETH",
                "side": "bid",
                "type": "limit",
                "price": "0.0001195",
                "size": "212",
                "filled": "212",
                "state": "filled",
                "timestamp": 1526018972869,
                "eq_price": "0.0001194999996323",
                "completed_at": "2018-05-11T06:09:38.946678Z",
                "source": "exchange"
            }
        }
    }
    
    

    Get Open Orders

    /v1/trading/orders [GET]

    List all open orders for a user.

    Query Parameters

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": {
            "orders": [
                {
                    "id": "8850805e-d783-46ec-9af5-30712035e760",
                    "trading_pair_id": "COB-ETH",
                    "side": "bid",
                    "type": "limit",
                    "price": "0.0001195",
                    "size": "212",
                    "filled": "212",
                    "state": "filled",
                    "timestamp": 1526018972869,
                    "eq_price": "0.0001194999996323",
                    "completed_at": "2018-05-11T06:09:38.946678Z",
                    "source": "exchange"
                }
            ]
        }
    }
    
    

    Modify Order

    /v1/trading/orders/:order_id [PUT]

    Modify an order.

    Path Parameters

    Request

    Payload

    {
        "price": "5000.01000000",
        "size": "1.0100"
    }
    
    

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": null
    }
    
    

    Get Order

    /v1/trading/orders/:order_id [GET]

    Get information for a single order.

    Path Parameters

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": {
            "order": {
                "id": "8850805e-d783-46ec-9af5-30712035e760",
                "trading_pair_id": "COB-ETH",
                "side": "bid",
                "type": "limit",
                "price": "0.0001195",
                "size": "212",
                "filled": "212",
                "state": "filled",
                "timestamp": 1526018972869,
                "eq_price": "0.0001194999996323",
                "completed_at": "2018-05-11T06:09:38.946678Z",
                "source": "exchange"
            }
        }
    }
    
    

    Cancel Order

    /v1/trading/orders/:order_id [DELETE]

    Cancel an order.

    Path Parameters

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": null
    }
    
    

    Get Trades of Order

    /v1/trading/orders/:order_id/trades [GET]

    Get trades which fill the specific order.

    Path Parameters

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": {
            "trades": [
                {
                    "id": "8850805e-d783-46ec-9af5-30712035e760",
                    "trading_pair_id": "COB-ETH",
                    "maker_side": "bid",
                    "price": "0.0001195",
                    "size": "212",
                    "timestamp": 1526540686123
                }
            ]
        }
    }
    
    

    Get All Open Positions

    /v1/trading/positions [GET]

    List all open positions for a user.

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": {
            "positions": [
                {
                    "id": "8850805e-d783-46ec-9af5-30712035e760",
                    "trading_pair_id": "COB-ETH",
                    "base_size": "0",
                    "quote_size": "0",
                    "base_on_order": "0",
                    "quote_on_order": "0",
                    "eq_price": "0",
                    "interest": "0",
                    "profit": "0",
                    "liq_price": "0"
                }
            ]
        }
    }
    
    

    Close Position

    /v1/trading/positions/:trading_pair_id [DELETE]

    Close a position.

    Path Parameters

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": {
            "order": {
                "id": "8850805e-d783-46ec-9af5-30712035e760",
                "trading_pair_id": "COB-ETH",
                "side": "bid",
                "type": "market",
                "price": "0",
                "size": "212",
                "filled": "0",
                "state": "queued",
                "timestamp": 1526018972869,
                "eq_price": "0",
                "completed_at": null,
                "source": "margin"
            }
        }
    }
    
    

    Get Position

    /v1/trading/positions/:trading_pair_id [GET]

    Get information for a single position.

    Path Parameters

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": {
            "position": {
                "id": "8850805e-d783-46ec-9af5-30712035e760",
                "trading_pair_id": "COB-ETH",
                "base_size": "0",
                "quote_size": "0",
                "base_on_order": "0",
                "quote_on_order": "0",
                "eq_price": "0",
                "interest": "0",
                "profit": "0",
                "liq_price": "0"
            }
        }
    }
    
    

    Claim Position

    /v1/trading/positions/:trading_pair_id [PATCH]

    Claim a position

    Path Parameters

    Request

    Payload

    {
        "size": "1.0100"
    }
    
    

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": null
    }
    
    

    Get Claimable Size

    /v1/trading/positions/:trading_pair_id/claimable_size [GET]

    Get claimable size depend on user's balance

    Path Parameters

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": {
            "size": "1"
        }
    }
    
    

    Get Trade History

    /v1/trading/trades [GET]

    Get historical trades.

    Query Parameters

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": {
            "total_page" : 1,
            "total_count" : 1,
            "page" : 1,
            "limit" : 50,
            "trades": [
                {
                    "id": "8850805e-d783-46ec-9af5-30712035e760",
                    "trading_pair_id": "COB-ETH",
                    "maker_side": "bid",
                    "price": "0.0001195",
                    "size": "212",
                    "timestamp": 1526540686123
                }
            ]
        }
    }
    
    

    Get Trade

    /v1/trading/trades/:trade_id [GET]

    Get information for a single trade.

    Path Parameters

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": {
            "trade": {
                "id": "8850805e-d783-46ec-9af5-30712035e760",
                "trading_pair_id": "COB-ETH",
                "maker_side": "bid",
                "price": "0.0001195",
                "size": "212",
                "timestamp": 1526540686123
            }
        }
    }
    
    

    Get Trading Volume

    /v1/trading/volume [GET]

    Get trading volume within a time.

    Query Parameters

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": {
            "volume": {
                "currency_id": "BTC",
                "sum": "0.1"
            }
        }
    }
    
    

    Funding [Auth]

    Setup Auto Offering

    /v1/funding/auto_offerings [POST]

    Setup an auto offering.

    Request

    Payload

    {
        "currency": "USDT",
        "period": 2,
        "interest_rate": "0.01",
        "size": "1"
    }
    
    

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": {
            "auto_offering": {
                "id": "8850805e-d783-46ec-9af5-30712035e760",
                "currency": "USDT",
                "size": "1",
                "interest_rate": "0.01",
                "period": 2,
                "active": true
            }
        }
    }
    
    

    Get All Active Auto Offerings

    /v1/funding/auto_offerings [GET]

    List all active auto offerings.

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": {
            "auto_offerings": [
                {
                    "id": "8850805e-d783-46ec-9af5-30712035e760",
                    "currency": "USDT",
                    "size": "1",
                    "interest_rate": "0.01",
                    "period": 2,
                    "active": true
                }
            ]
        }
    }
    
    

    Get Auto Offering

    /v1/funding/auto_offerings/:currency_id [GET]

    Get information for an auto offering.

    Path Parameters

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": {
            "auto_offering": {
                "id": "8850805e-d783-46ec-9af5-30712035e760",
                "currency": "USDT",
                "size": "1",
                "interest_rate": "0.01",
                "period": 2,
                "active": true
            }
        }
    }
    
    

    Disable Auto Offering

    /v1/funding/auto_offerings/:currency_id [DELETE]

    Disable an auto offering.

    Path Parameters

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": null
    }
    
    

    Get Funding Orders History

    /v1/funding/funding_history [GET]

    List historical funding orders.

    Query Parameters

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": {
            "total_page" : 1,
            "total_count" : 1,
            "page" : 1,
            "limit" : 50,
            "fundings": [
              {
                  "id": "8850805e-d783-46ec-9af5-30712035e760",
                  "period": 49,
                  "type": "limit",
                  "interest_rate": "0.05",
                  "size": "1000.3002",
                  "filled": "0",
                  "currency": "COB",
                  "side": "bid",
                  "state": "filled",
                  "completed_at": "2018-05-07T01:10:02.999169Z",
                  "auto_refund": false,
                  "position_id": null,
                  "timestamp": 1529401868804
              }
            ]
        }
    }
    
    

    Place Funding Order

    /v1/funding/fundings [POST]

    Place a funding order.

    Request

    Payload

    {
        "side": "bid",
        "type": "limit",
        "interest_rate": "0.05",
        "size": "1000.3002",
        "period": 49,
        "currency": "COB"
    }
    
    

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": {
          "funding": {
            "id": "8850805e-d783-46ec-9af5-30712035e760",
            "period": 49,
            "type": "limit",
            "interest_rate": "0.05",
            "size": "1000.3002",
            "filled": "0",
            "currency": "COB",
            "side": "bid",
            "state": "filled",
            "completed_at": "2018-05-07T01:10:02.999169Z",
            "auto_refund": false,
            "position_id": null,
            "timestamp": 1529401868804
          }
        }
    }
    
    

    Get Open Funding Orders

    /v1/funding/fundings [GET]

    List all open funding orders for a user.

    Query Parameters

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": {
            "total_page" : 1,
            "total_count" : 1,
            "page" : 1,
            "limit" : 50,
            "fundings": [
              {
                  "id": "8850805e-d783-46ec-9af5-30712035e760",
                  "period": 49,
                  "type": "limit",
                  "interest_rate": "0.05",
                  "size": "1000.3002",
                  "filled": "0",
                  "currency": "COB",
                  "side": "bid",
                  "state": "filled",
                  "completed_at": "2018-05-07T01:10:02.999169Z",
                  "auto_refund": false,
                  "position_id": null,
                  "timestamp": 1529401868804
              }
            ]
        }
    }
    
    

    Modify Funding Order

    /v1/funding/fundings/:funding_id [PUT]

    Modify a funding order.

    Path Parameters

    Request

    Payload

    {
        "interest_rate": "0.08",
        "size": "100000.300"
    }
    
    

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": null
    }
    
    

    Cancel Funding Order

    /v1/funding/fundings/:funding_id [DELETE]

    Cancel an funding order.

    Path Parameters

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": null
    }
    
    

    Get All Loans

    /v1/funding/loans [GET]

    List all loans for a user.

    Query Parameters

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": {
            "total_page" : 1,
            "total_count" : 1,
            "page" : 1,
            "limit" : 50,
            "loans": [
                {
                    "id": "8850805e-d783-46ec-9af5-30712035e760",
                    "timestamp": 1529020800,
                    "currency": "USDT",
                    "size": "1",
                    "interest_rate": "0.01",
                    "period": 2,
                    "state": "active",
                    "will_close_at": "2018-05-23T04:20:50.304063Z",
                    "completed_at": null,
                    "auto_refund": false,
                    "side": "ask"
                }
            ]
        }
    }
    
    

    Get Loan

    /v1/funding/loans/:loan_id [GET]

    Get information for a single loan.

    Path Parameters

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": {
            "loan": {
                "id": "8850805e-d783-46ec-9af5-30712035e760",
                "timestamp": 1529020800,
                "currency": "USDT",
                "size": "1",
                "interest_rate": "0.01",
                "period": 2,
                "state": "active",
                "will_close_at": "2018-05-23T04:20:50.304063Z",
                "completed_at": null,
                "auto_refund": false,
                "side": "ask"
            }
        }
    }
    
    

    Close Loan

    /v1/funding/loans/:loan_id [DELETE]

    Close a loan manually.

    Path Parameters

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": null
    }
    
    

    Market

    Get Currencies

    /v1/market/currencies [GET]

    This endpoint returns all supported currencies and related information.

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": {
            "currencies": [
                {
                    "currency": "REP",
                    "name": "Augur",
                    "type": "erc20",
                    "min_unit": "0.00000001",
                    "deposit_fee": "0",
                    "withdrawal_fee": "0.06",
                    "min_withdrawal": "0.20387",
                    "funding_min_size": "0.611",
                    "interest_increment": "0.001",
                    "margin_enabled": false,
                    "deposit_frozen": false,
                    "withdrawal_frozen": false,
                    "cob_withdrawal_fee": "18.16970378"
                }
            ]
        }
    }
    
    

    Get Fundingbook Precisions

    /v1/market/fundingbook/precisions/:currency_id [GET]

    Returns available precisions in scientific notation of funndingbook by given currency.

    Path Parameters

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": {
            "precisions": [
                "1E-7",
                "5E-7",
                "1E-6",
                "5E-6",
                "1E-5",
                "5E-5",
                "1E-4",
                "5E-4",
                "1E-3",
                "5E-3",
                "1E-2",
                "5E-2"
              ]
        }
    }
    
    

    Get Fundingbook

    /v1/market/fundingbooks/:currency_id [GET]

    Return fundingbook of given currency.

    Path Parameters

    Query Parameters

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": {
            "fundingbook": {
                "sequence": 0,
                "bids": [
                    [
                        "0.0830804",
                        "1",
                        "3.7387",
                        "1",
                        "3"
                    ]
                ],
                "asks": [
                    [
                        "0.0834349",
                        "1",
                        "5.3396",
                        "2",
                        "2"
                    ]
                ]
            }
        }
    }
    
    

    Get Orderbook Precisions

    /v1/market/orderbook/precisions/:trading_pair_id [GET]

    Returns available precisions in scientific notation of orderbook by given trading pair.

    Path Parameters

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": [
          "1E-7",
          "5E-7",
          "1E-6",
          "5E-6",
          "1E-5",
          "5E-5",
          "1E-4",
          "5E-4",
          "1E-3",
          "5E-3",
          "1E-2",
          "5E-2"
        ]
    }
    
    

    Get Orderbook

    /v1/market/orderbooks/:trading_pair_id [GET]

    Return orderbook of given trading pair.

    Path Parameters

    Query Parameters

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": {
            "orderbook": {
                "sequence": 0,
                "bids": [
                    [
                        "0.0830804",
                        "1",
                        "3.7387"
                    ]
                ],
                "asks": [
                    [
                        "0.0834349",
                        "1",
                        "5.3396"
                    ]
                ]
            }
        }
    }
    
    

    Get Quote Currencies

    /v1/market/quote_currencies [GET]

    This endpoint returns all supported quote currencies and related information.

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": {
            "quote_currencies": [
                {
                    "currency": "BTC",
                    "name": "Bitcoin",
                    "type": "native",
                    "min_unit": "0.00000001",
                    "deposit_fee": "0",
                    "withdrawal_fee": "0.001",
                    "min_withdrawal": "0.00109",
                    "funding_min_size": "0.003",
                    "interest_increment": "0.001",
                    "margin_enabled": false,
                    "deposit_frozen": false,
                    "withdrawal_frozen": false,
                    "cob_withdrawal_fee": "51.02040816"
                }
            ]
        }
    }
    
    

    Show Exchange statistics

    /v1/market/stats [GET]

    Returns exchange statistics in past 24 hours by trading pair.

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": {
            "ETH-BTC": {
                "id": "ETH-BTC",
                "last_price": "0.0836",
                "lowest_ask": "0.0837158",
                "highest_bid": "0.083461",
                "base_volume": "302.09964207",
                "quote_volume": "25.347837637256305",
                "is_frozen": false,
                "high_24hr": "0.08519",
                "low_24hr": "0.0825143",
                "percent_changed_24hr": "0.0023980815347722"
            }
        }
    }
    
    

    Get Tickers

    /v1/market/tickers [GET]

    Returns all trading pair tickers.

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": {
            "tickers": [
                {
                    "trading_pair_id": "ETH-BTC",
                    "timestamp": 1526442600000,
                    "24h_high": "0.08519",
                    "24h_low": "0.0825143",
                    "24h_open": "0.0832193",
                    "24h_volume": "297.48782148000026",
                    "last_trade_price": "0.0839425",
                    "highest_bid": "0.083694",
                    "lowest_ask": "0.0839903"
                }
            ]
        }
    }
    
    

    Get Ticker

    /v1/market/tickers/:trading_pair_id [GET]

    Return trading pair of given trading pair.

    Path Parameters

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": {
            "ticker": {
              "trading_pair_id": "ETH-BTC",
              "timestamp": 1526442660000,
              "24h_high": "0.08519",
              "24h_low": "0.0825143",
              "24h_open": "0.083655",
              "24h_volume": "296.60529380000025",
              "last_trade_price": "0.0839425",
              "highest_bid": "0.0836897",
              "lowest_ask": "0.0839091"
            }
        }
    }
    
    

    Get Trades

    /v1/market/trades/:trading_pair_id [GET]

    Returns recently trades of given trading pair.

    Path Parameters

    Query Parameters

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": {
            "trades": [
                {
                    "id": "c0008469-1dd0-45d7-bbcc-97879ded8232",
                    "trading_pair_id": "BTC-USDT",
                    "maker_side": "bid",
                    "timestamp": 1526441812535,
                    "price": "0.0837002",
                    "size": "0.06135"
                }
            ]
        }
    }
    
    

    Get Trading Pairs

    /v1/market/trading_pairs [GET]

    Returns all supported trading pairs and related information.

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": {
            "trading_pairs": [
                {
                    "id": "ETH-BTC",
                    "base_currency_id": "ETH",
                    "quote_currency_id": "BTC",
                    "base_max_size": "1361.889",
                    "base_min_size": "0.027",
                    "quote_increment": "0.0000001",
                    "margin_enabled": false
                }
            ]
        }
    }
    
    

    System

    Get System Time

    /v1/system/time [GET]

    Get the reference system time as Unix timestamp.

    Response

    [Success] Response 200 (application/json)

    {
        "success": true,
        "result": {
            "time": 1505204498376
        }
    }
    
    

    WebSocket [Deprecated]

    Order [Auth]

    Request

    {
        "action": "subscribe",
        "type": "order"
    }
    

    Response

    {
        "event": "subscribed",
        "type": "order",
        "channel_id": CHANNEL_ID
    }
    

    Snapshot / Update

    //update
    {
        "channel_id": CHANNEL_ID,
        "update":
            [
                ORDER_ID,
                TRADING_PAIR_ID,
                STATUS,
                SIDE,
                TYPE,
                PRICE,
                SIZE,
                FILLED_SIZE,
                TIME_STAMP
             ]
    }
    

    WARN: v1 order update won't support complete conditional order and will deprecate. Please check v2 order update.

    Trades

    After receiving the response, you will start receiving recent trade, followed by any trade that occurs at COBINHOOD.

    Request

    {
        "action": "subscribe",
        "type": "trade",
        "trading_pair_id": TRADING_PAIR_ID
    }
    

    Response

    {
        "event": "subscribed",
        "type": "trade",
        "channel_id": CHANNEL_ID,
        "trading_pair_id": TRADING_PAIR_ID
    }
    

    Snapshot

    {
        "channel_id": CHANNEL_ID,
        "snapshot":
            [
                [TRADE_ID, TIME_STAMP, PRICE, SIZE, MAKER_SIDE],
                ...
            ]
    }
    

    Update

    {
        "channel_id": CHANNEL_ID,
        "update":
            [
                [TRADE_ID, TIME_STAMP, PRICE, SIZE, MAKER_SIDE],
                ...
            ]
    }
    

    Order book

    After receiving the response, you will receive a snapshot of the book, followed by updates upon any changes to the book.

    Request

    {
        "action": "subscribe",
        "type": "order-book",
        "trading_pair_id": TRADING_PAIR_ID,
        "precision": PRECISION
    }
    

    Response

    {
        "event": "subscribed",
        "type": "order-book",
        "channel_id": CHANNEL_ID,
        "trading_pair_id": TRADING_PAIR_ID,
        "precision": PRECISION
    }
    

    Snapshot

    //snapshot
    {
        "channel_id": CHANNEL_ID,
        "snapshot":  {
            "bids": [
                [ PRICE, SIZE, COUNT ],
                ...
            ],
            "asks": [
                [ PRICE, SIZE, COUNT ],
                ...
            ]
        }
    }
    

    Update

    //update
    {
        "channel_id": CHANNEL_ID,
        "update":  {
            "bids": [
                [ PRICE, COUNT, SIZE ],
                ...
            ],
            "asks": [
                [ PRICE, COUNT, SIZE ],
                ...
            ]
        }
    }
    

    Ticker

    {
        "action": "subscribe",
        "type": "ticker",
        "trading_pair_id": TRADING_PAIR_ID
    }
    

    Response

    {
        "event": "subscribed",
        "type": "ticker",
        "channel_id": CHANNEL_ID,
        "trading_pair_id": TRADING_PAIR_ID
    }
    

    Snapshot

    {
        "channel_id": CHANNEL_ID,
        "snapshot":
            [
                LAST_TRADE_ID,
                PRICE,
                HIGHEST_BID,
                LOWEST_ASK,
                24H_VOLUME,
                24H_HIGH,
                24H_LOW,
                24H_OPEN,
                TIME_STAMP
            ]
    }
    

    Update

    {
        "channel_id": CHANNEL_ID,
        "update":
            [
                LAST_TRADE_ID,
                PRICE,
                HIGHEST_BID,
                LOWEST_ASK,
                24H_VOLUME,
                24H_HIGH,
                24H_LOW,
                24H_OPEN,
                TIME_STAMP
            ]
    }
    

    After receiving the response, you will receive a snapshot of the ticker, followed by updates upon any changes to the tickers.

    Candle

    Request

    {
        "action": "subscribe",
        "type": "candle",
        "trading_pair_id": TRADING_PAIR_ID,
        "timeframe": TIMEFRAME
    }
    

    Response

    {
        "event": "subscribed",
        "type": "candle",
        "channel_id": CHANNEL_ID,
        "trading_pair_id": TRADING_PAIR_ID,
        "timeframe": TIMEFRAME
    }
    

    Snapshot

    {
        "channel_id": CHANNEL_ID,
        "snapshot":
            [
                [TIME, OPEN, CLOSE, HIGH, LOW, VOL],
                ...
            ]
    }
    

    Update

    {
        "channel_id": CHANNEL_ID,
        "update":
            [
                [TIME, OPEN, CLOSE, HIGH, LOW, VOL],
                ...
            ]
    }
    

    After receiving the response, you will receive a snapshot of the candle data, followed by updates upon any changes to the chart. Updates to the most recent timeframe interval are emitted.

    Ping/Pong

    Request

    {
        "action": "ping"
    }
    

    Response

    {
        "event": "pong"
    }
    

    Send ping to test connection and extends disconnection timeout which is 64 seconds.

    Unsubscribe

    Request

    {
        "action": "unsubscribe",
        "channel_id": CHANNEL_ID
    }
    

    Response

    {
        "event": "unsubscribed",
        "channel_id": CHANNEL_ID
    }
    

    Send unsubscribe action to unsubscribe channel + CHANNEL_ID: The channel id for event type + string + CHANNEL_ID: The channel id for event type + string

    WebSocket error code

    Error code for the specified error event occured, server will reponse an error message including error code and request parameters. For example:

    {
        "event": "error",
        "code": 4001,
        "message": "undefined_action",
        "type": "ticker",
        "trading_pair_id": "BTC-USDT"
    }
    

    Error Code

    Websocket V2

    To reduce payload size, using abbreviation and supporting message compression (RFC 7692), and support extendable structure, using key-value pair, JSON payload would result in following schema:

     {
        "h": [],    // header: extendable payload header.
                    // Format: [channel_id, version, type]
                    //  * version for future iteration.
                    //  * type is defined according to resource.
                    //
                    // Generally, we have following types:
                    //  * "s" for snapshot
                    //  * "u" for update.
                    //
                    // For order response, we may have enum mapping to order type.
    
        "d": [],    // data: array most time, will be ordered by uniqueness.
                    // For exmpale:
                    //  * data with uuid, uuid would be the first
                    //  * data without uuid, timestamp is more
                    //      distinguishable than other fields.
    
     }
    

    Common Parameters

    NOTE: all fields are converted to string for correct precision

    Version

    Type

    For control response (see sessions below):

    For data response (seed sessions below):

    Control Request/Response

    Ping/Pong

    Ping/pong extends disconnection timeout. If no ping/pong message recieved, connection will be dropped by server in 64 seconds after last seen ping/pong message.

    Request

    {
        "action": "ping",
        "id": "sample_id"
    }
    

    Response

    {
        // [channel_id, version, type, request_id (optional)]
        "h": ["", "2", "pong", "sample_id"],
        "d": []
    }
    

    Subscribe

    Please check channels below. the optional parameters are different from channel to channel.

    Unsubscribe

    Unsubscribe from given channel to reduce unused data stream.

    PARAMS

    Request

    {
        "action": "unsubscribe",
        "channel_id": CHANNEL_ID,
        "id": "sample_id2"
    }
    
    {
        // Or same payload as subscribe, but with 'unsubscribe' in action.
        "action": "unsubscribe",
        "type": "ticker",
        "trading_pair_id": "ETH-BTC",
        "id": "sample_id2"
    }
    

    Response

    {
        // [channel_id, version, type, request_id (optional)]
        "h": ["trade.ETH-BTC", "2", "unsubscribed", "sample_id2"],
        "d": []
    }
    

    Error

    Error code for the specified error event occured, server will reponse an error message including error code. For example:

    Error Code

    Response

    {
        // [channel_id, version, type, error_code, msg, request_id (optional)]
        "h": ["", "2", "error", "4002", "channel_not_found"],
        "d": []
    }
    

    Channel Request/Response

    Order [Auth]

    Order response provides extra information for recognition, the following sessions show all values of field enumerations.

    Action

    Type

    Event

    State

    Side

    Source

    PARAMS

    Request

    {
        "action": "subscribe",
        "type": "order"
    }
    
    // order operation (place)
    {
        "action": "place_order",
        "trading_pair_id": "COB-ETH",
        "type": "0",    // Type enum above
        "price": "123.4567",
        "size": "1000.000",
        "side": "bid"/"ask",
        "source": "exchange",
        "stop_price": "",        // mandatory for stop/stop-limit order
        "trailing_distance": "", // mandatory for trailing-stop order
        "id": "order_req_id1"
    }
    
    // order operation (modify)
    {
        "action": "modify_order",
        "type": "0",    // Type enum above
        "order_id": "xxxx-xxxx-xxxx-xxxx",
        "price": "123.4567",
        "size": "1000.000",
        "stop_price": "",        // mandatory for stop/stop-limit order
        "trailing_distance": "", // mandatory for trailing stop order
        "id": "order_req_id2"
    }
    
    // order operation (cancel)
    {
        "action": "cancel_order",
        "type": "0",    // Type enum above
        "order_id": "xxxx-xxxx-xxxx-xxxx"
    }
    

    Response

    Limit Order

    {
        // [channel_id, version, message_type, order_type, request_id (optional)]
        "h": ["order", "2", "u", "0"],
        "d": [
            ORDER_ID,
            TIMESTAMP,
            COMPLETED_AT,
            TRADING_PAIR_ID,
            STATE,
            EVENT,
            SIDE,
            PRICE,
            EQ_PRICE,
            SIZE,
            PARTIAL_FILLED_SIZE,
            SOURCE
        ]
    }
    

    Market Order

    {
        // [channel_id, version, message_type, order_type, request_id (optional)]
        "h": ["order", "2", "u", "1"],
        "d": [
            ORDER_ID,
            TIMESTAMP,
            COMPLETED_AT,
            TRADING_PAIR_ID,
            STATE,
            EVENT,
            SIDE,
            EQ_PRICE,
            SIZE,
            PARTIAL_FILLED_SIZE,
            SOURCE
        ]
    }
    

    Stop Order

    {
        // [channel_id, version, message_type, order_type, request_id (optional)]
        "h": ["order", "2", "u", "2"],
        "d": [
            ORDER_ID,
            TIMESTAMP,
            COMPLETED_AT,
            TRADING_PAIR_ID,
            STATE,
            EVENT,
            SIDE,
            EQ_PRICE,
            SIZE,
            PARTIAL_FILLED_SIZE,
            STOP_PRICE,
            SOURCE
        ]
    }
    

    Limit Stop Order

    {
        // [channel_id, version, message_type, order_type, request_id (optional)]
        "h": ["order", "2", "u", "3"],
        "d": [
            ORDER_ID,
            TIMESTAMP,
            COMPLETED_AT,
            TRADING_PAIR_ID,
            STATE,
            EVENT,
            SIDE,
            PRICE,
            EQ_PRICE,
            SIZE,
            PARTIAL_FILLED_SIZE,
            STOP_PRICE,
            SOURCE
        ]
    }
    

    Orderbook

    After receiving the response, you will receive a snapshot of the book, followed by updates upon any changes to the book. The updates is published as DIFF.

    PARAMS

    Request

    {
        "action": "subscribe",
        "type": "order-book",
        "trading_pair_id": TRADING_PAIR_ID
        "precision": PRECISION
    }
    

    Response

    {
        // [channel_id, version, type]
        "h": ["order-book.COB-ETH.1E-7", "2", "u"],
        "d": {
            "bids": [
                [ PRICE, COUNT, SIZE ],
                ...
            ],
            "asks": [
                [ PRICE, COUNT, SIZE ],
                ...
            ]
        }
    }
    

    Trade

    After receiving the response, you will start receiving recent trade, followed by any trade that occurs at COBINHOOD.

    PARAMS

    Request

    {
        "action": "subscribe",
        "type": "trade",
        "trading_pair_id": TRADING_PAIR_ID
    }
    

    Response

    {
        "h": ["trade.COB-ETH", "2", "u"],
        "d":
            [
                [TRADE_ID, TIME_STAMP, MAKER_SIDE, PRICE, SIZE],
                ...
            ]
    }
    

    Ticker

    After receiving the response, you will start receiving ticker updates

    Request

    {
        "action": "subscribe",
        "type": "ticker",
        "trading_pair_id": TRADING_PAIR_ID
    }
    

    Response

    {
        "h": ["ticker.COB-ETH", "2", "u"],
        "d": [
            [
                TIME_STAMP,
                HIGHEST_BID,
                LOWEST_ASK,
                24H_VOLUME,
                24H_HIGH,
                24H_LOW,
                24H_OPEN,
                LAST_TRADE_PRICE
            ]
        ]
    }
    

    Candle

    After receiving the response, you will receive a snapshot of the candle data, followed by updates upon any changes to the chart. Updates to the most recent timeframe interval are emitted.

    Timeframe

    PARAMS

    Request

    {
        "action": "subscribe",
        "type": "candle",
        "trading_pair_id": TRADING_PAIR_ID,
        "timeframe": TIMEFRAME
    }
    

    Response

    {
        "h": ["candle.ETH-BTC.1h", "2", "u"],
        "d":
            [
                [TIME_STAMP, VOL, HIGH, LOW, OPEN, CLOSE],
                ...
            ]
    }
    

    Matched loans

    After subscribing this topic, you will start receiving recent matched loans, followed by any loan that occurs at COBINHOOD.

    State

    Event

    Side

    PARAMS

    Request

    {
        "action": "subscribe",
        "type": "loan",
        "currency_id": CURRENCY_ID
    }
    

    Response

    {
        "h": ["loan.COB", "2", "u"],
        "d":
            [
                [
                    LOAN_ID,
                    TIME_STAMP,
                    WILL_CLOSE_AT,
                    COMPLETED_AT,
                    CURRENCY_ID,
                    STATE,
                    EVENT,
                    INTEREST_RATE,
                    SIZE,
                    PERIOD,
                    AUTO_REFUND
                ],
              ...
            ]
    }
    

    User's loan updates [Auth]

    After subscribing this topic, you will start receiving your loans' status update Response format is same as matched loan.

    Request

    {
        "action": "subscribe",
        "type": "loan-update",
    }
    

    Response

    {
        "h": ["loan-update", "2", "u"],
        "d":
            [
                [
                    LOAN_ID,
                    TIME_STAMP,
                    WILL_CLOSE_AT,
                    COMPLETED_AT,
                    CURRENCY_ID,
                    STATE,
                    EVENT,
                    INTEREST_RATE,
                    SIZE,
                    PERIOD,
                    AUTO_REFUND
                ],
              ...
            ]
    }
    

    Funding [Auth]

    After subscribing this topic, you will get all funding updates at COBINHOOD.

    PARAMS

    Request

    {
        "action": "subscribe",
        "type": "funding",
    }
    

    Response

    {
        // topic, version, type, funding type
        "h": ["funding", "2", "u", ],
        "d":
            [
                [
                    FUNDING_ID,
                    TIMESTAMP,
                    COMPLETED_AT,
                    CURRENCY_ID,
                    STATE,
                    INTEREST_RATE,
                    SIZE,
                    FILLED,
                    PERIOD,
                    AUTO_REFUND
                ],
              ...
            ]
    }
    

    Fundingbook

    After receiving the response, you will receive a snapshot of the book, followed by updates upon any changes to the book. The updates is published as DIFF.

    PARAMS

    Request

    {
        "action": "subscribe",
        "type": "funding-book",
        "currency_id": CURRENCY_ID,
        "precision": PRECISION
    }
    

    Response

    {
        // [channel_id, version, type]
        "h": ["funding-book.COB-ETH.1E-7", "2", "u"],
        "d": {
            "bids": [
                [ RATE, COUNT, SIZE, MIN_PERIOD, MAX_PERIOD ],
                ...
            ],
            "asks": [
                [ RATE, COUNT, SIZE, MIN_PERIOD, MAX_PERIOD ],
                ...
            ]
        }
    }
    

    Loan Ticker

    After receiving the response, you will start receiving loan ticker updates

    Request

    {
        "action": "subscribe",
        "type": "loan-ticker",
        "currency_id": CURRENCY_ID
    }
    

    Response

    {
        "h": ["ticker.COB", "2", "u"],
        "d": [
            [
              TIME_STAMP,
              24H_VOLUME,
              24H_HIGH,
              24H_LOW,
              24H_OPEN,
              24H_LAST
            ]
        ]
    }