NAV Navbar
http
  • Overview
  • Chart
  • Funding [Auth]
  • Market
  • System
  • Trading [Auth]
  • Wallet [Auth]
  • WebSocket Common
  • 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

    Sample Response

    {
        "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"
                }
            ]
        }
    }
    
    

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

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

    Path Parameters

    Query Parameters

    Response

    Funding [Auth]

    Setup Auto Offering

    Sample Request

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

    Sample Response

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

    /v1/funding/auto_offerings [POST]

    Setup an auto offering.

    Request

    Response

    Get All Active Auto Offerings

    Sample Response

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

    /v1/funding/auto_offerings [GET]

    List all active auto offerings.

    Response

    Disable Auto Offering

    Sample Response

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

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

    Disable an auto offering.

    Path Parameters

    Response

    Get Auto Offering

    Sample Response

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

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

    Get information for an auto offering.

    Path Parameters

    Response

    Get Funding Orders History

    Sample Response

    {
        "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
              }
            ]
        }
    }
    
    

    /v1/funding/funding_history [GET]

    List historical funding orders.

    Query Parameters

    Response

    Place Funding Order

    Sample Request

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

    Sample Response

    {
        "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
          }
        }
    }
    
    

    /v1/funding/fundings [POST]

    Place a funding order.

    Request

    Response

    Get Open Funding Orders

    Sample Response

    {
        "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
              }
            ]
        }
    }
    
    

    /v1/funding/fundings [GET]

    List all open funding orders for a user.

    Query Parameters

    Response

    Modify Funding Order

    Sample Request

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

    Sample Response

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

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

    Modify a funding order.

    Path Parameters

    Request

    Response

    Cancel Funding Order

    Sample Response

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

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

    Cancel an funding order.

    Path Parameters

    Response

    Get All Loans

    Sample Response

    {
        "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",
                    "maker_side": "ask"
                }
            ]
        }
    }
    
    

    /v1/funding/loans [GET]

    List all loans for a user.

    Query Parameters

    Response

    Close Loan

    Sample Response

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

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

    Close a loan manually.

    Path Parameters

    Response

    Get Loan

    Sample Response

    {
        "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",
                "maker_side": "ask"
            }
        }
    }
    
    

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

    Get information for a single loan.

    Path Parameters

    Response

    Market

    Get Currencies

    Sample Response

    {
        "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",
                    "optional_field_text": null
                }
            ]
        }
    }
    
    

    /v1/market/currencies [GET]

    This endpoint returns all supported currencies and related information.

    Response

    Get Fundingbook Precisions

    Sample Response

    {
        "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"
              ]
        }
    }
    
    

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

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

    Path Parameters

    Response

    Get Fundingbook

    Sample Response

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

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

    Return fundingbook of given currency.

    Path Parameters

    Query Parameters

    Response

    Get Orderbook Precisions

    Sample Response

    {
        "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"
        ]
    }
    
    

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

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

    Path Parameters

    Response

    Get Orderbook

    Sample Response

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

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

    Return orderbook of given trading pair.

    Path Parameters

    Query Parameters

    Response

    Get Quote Currencies

    Sample Response

    {
        "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",
                    "optional_field_text": null
                }
            ]
        }
    }
    
    

    /v1/market/quote_currencies [GET]

    This endpoint returns all supported quote currencies and related information.

    Response

    Show Exchange statistics

    Sample Response

    {
        "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"
            }
        }
    }
    
    

    /v1/market/stats [GET]

    Returns exchange statistics in past 24 hours by trading pair.

    Response

    Get Tickers

    Sample Response

    {
        "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"
                }
            ]
        }
    }
    
    

    /v1/market/tickers [GET]

    Returns all trading pair tickers.

    Response

    Get Ticker

    Sample Response

    {
        "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"
            }
        }
    }
    
    

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

    Return trading pair of given trading pair.

    Path Parameters

    Response

    Get Trades

    Sample Response

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

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

    Returns recently 50 periodly updated, cached trades of given trading pair.

    Path Parameters

    Response

    Get Trades with pagination

    Sample Response

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

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

    Returns trades of given trading pair, pagination supported, order by timestamp, descending.

    Path Parameters

    Query Parameters

    Response

    Get Trading Pairs

    Sample Response

    {
        "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
                }
            ]
        }
    }
    
    

    /v1/market/trading_pairs [GET]

    Returns all supported trading pairs and related information.

    Response

    System

    Get System Time

    Sample Response

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

    /v1/system/time [GET]

    Get the reference system time as Unix timestamp.

    Response

    Trading [Auth]

    Check Order

    Sample Request

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

    Sample Response

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

    /v1/trading/check_order [POST]

    Check conditional order will be executed immediately.

    Request

    Response

    Get Order History

    Sample Response

    {
        "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"
                }
            ]
        }
    }
    
    

    /v1/trading/order_history [GET]

    Get historical orders.

    Query Parameters

    Response

    Place Order

    Sample Request

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

    Sample Response

    {
        "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"
            }
        }
    }
    
    

    /v1/trading/orders [POST]

    Place an order.

    Request

    Response

    Get Open Orders

    Sample Response

    {
        "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"
                }
            ]
        }
    }
    
    

    /v1/trading/orders [GET]

    List all open orders for a user.

    Query Parameters

    Response

    Modify Order

    Sample Request

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

    Sample Response

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

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

    Modify an order.

    Path Parameters

    Request

    Response

    Cancel Order

    Sample Response

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

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

    Cancel an order.

    Path Parameters

    Response

    Get Order

    Sample Response

    {
        "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"
            }
        }
    }
    
    

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

    Get information for a single order.

    Path Parameters

    Response

    Get Trades of Order

    Sample Response

    {
        "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
                }
            ]
        }
    }
    
    

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

    Get trades which fill the specific order.

    Path Parameters

    Response

    Get All Open Positions

    Sample Response

    {
        "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"
                }
            ]
        }
    }
    
    

    /v1/trading/positions [GET]

    List all open positions for a user.

    Response

    Claim Position

    Sample Request

    {
        "size": "1.0100"
    }
    
    

    Sample Response

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

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

    Claim a position

    Path Parameters

    Request

    Response

    Get Position

    Sample Response

    {
        "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"
            }
        }
    }
    
    

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

    Get information for a single position.

    Path Parameters

    Response

    Close Position

    Sample Response

    {
        "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"
            }
        }
    }
    
    

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

    Close a position.

    Path Parameters

    Response

    Get Claimable Size

    Sample Response

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

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

    Get claimable size depend on user's balance

    Path Parameters

    Response

    Get Trade History

    Sample Response

    {
        "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
                }
            ]
        }
    }
    
    

    /v1/trading/trades [GET]

    Get historical trades.

    Query Parameters

    Response

    Get Trade

    Sample Response

    {
        "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
            }
        }
    }
    
    

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

    Get information for a single trade.

    Path Parameters

    Response

    Get Trading Volume

    Sample Response

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

    /v1/trading/volume [GET]

    Get trading volume within a time.

    Query Parameters

    Response

    Wallet [Auth]

    Get Balances

    Sample Response

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

    /v1/wallet/balances [GET]

    Get currencies, amounts, types, status of balances.

    Query Parameters

    Response

    Create New Deposit Address

    Sample Request

    {
        "currency": "BTC",
        "ledger_type": "exchange"
    }
    
    

    Sample Response

    {
        "success": true,
        "result": {
            "deposit_address": {
                "address": "0x5BDfdC2fC119C9Cc485B6d6d6ce55dc6E5CCCb13",
                "blockchain_id": "ethereum",
                "created_at": 1528251226750,
                "currency": "ETH",
                "type": "exchange"
            }
        }
    }
    
    

    /v1/wallet/deposit_addresses [POST]

    desc

    Request

    Response

    Get IOTA Deposit Address

    Sample Response

    {
        "success": true,
        "result": {
            "deposit_address": {
                "currency": "IOTA",
                "address": "GRIUAMSEAKOGECZYTPXLECJPFUOS9URIJZOBHTDVQDOTVWJKNPLCAPXFMGTD9CNUFNP9EEVBIISRCVEIYMNVIPSTJX",
                "created_at": 1504459805123
            }
        }
    }
    
    

    /v1/wallet/deposit_addresses/iota [GET]

    Get a IOTA address for deposit.

    Response

    Get All Generic Deposits

    Sample Response

    {
        "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"
                   }
                }
            ]
        }
    }
    
    

    /v1/wallet/generic_deposits [GET]

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

    Response

    Get Generic Deposit

    Sample Response

    {
        "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"
                }
            }
        }
    }
    
    

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

    Get information for a single generic deposit.

    Path Parameters

    Response

    Get All Generic Withdrawals

    Sample Response

    {
        "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"
                    }
                }
            ]
        }
    }
    
    

    /v1/wallet/generic_withdrawals [GET]

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

    Response

    Cancel Generic Withdrawal

    Sample Response

    {
        "success": true,
        "result": {
            "message_code": "withdrawal_cancelled"
        }
    }
    
    

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

    Cancel a pending generic withdrawal.

    Path Parameters

    Response

    Get Generic Withdrawal

    Sample Response

    {
        "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"
                }
            }
        }
    }
    
    

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

    Get infomation for a single generic withdrawal.

    Path Parameters

    Response

    Get Ledger Entries

    Sample Response

    {
        "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
                }
            ]
        }
    }
    
    

    /v1/wallet/ledger [GET]

    Get balance change logs. Pagination is supported.

    Query Parameters

    Response

    Get Withdrawal Limit

    Sample Response

    {
        "success": true,
        "result": {
            "withdrawal_limit": {
                "daily_fiat_withdrawal_usd_limit": "0",
                "monthly_fiat_withdrawal_usd_limit": "0",
                "daily_crypto_withdrawal_usd_limit": "3",
                "monthly_crypto_withdrawal_usd_limit": "90",
                "daily_fiat_deposit_usd_limit": "0",
                "monthly_fiat_deposit_usd_limit": "0",
                "daily_crypto_deposit_usd_limit": "-1",
                "monthly_crypto_deposit_usd_limit": "-1",
                "daily_crypto_usd_withdrawn": "0",
                "monthly_crypto_usd_withdrawn": "0",
                "daily_crypto_btc_withdrawn": "0",
                "monthly_crypto_btc_withdrawn": "0",
                "daily_crypto_withdrawal_btc_limit": "3",
                "monthly_crypto_withdrawal_btc_limit": "90",
                "daily_crypto_deposit_btc_limit": "-1",
                "monthly_crypto_deposit_btc_limit": "-1"
            }
        }
    }
    
    

    /v1/wallet/limits/withdrawal [GET]

    Get daily and monthly limit of withdrawal and deposit.

    Response

    Transfer Balance Between Wallets

    Sample Request

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

    Sample Response

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

    /v1/wallet/transfer [POST]

    Transfer balance between different types of wallets.

    Request

    Response

    Add Withdrawal Wallet

    Sample Request

    {
        "currency": "BTC",
        "address": "0xA4412f28a2Eb1eA1B28A567dC0242Ece6ce4916f",
        "name": "Misora's little wallet"
    }
    
    

    Sample Response

    {
        "success": true,
        "result": {
            "2fa": {
                "type": "totp",
                "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
            }
        }
    }
    
    

    /v1/wallet/withdrawal_addresses [POST]

    Add a withdrawal wallet

    Request

    Response

    Delete Withdrawal Wallet

    Sample Response

    {
        "success": true,
        "result": {
            "withdrawal_address": {
                "message_code": "delete_withdrawal_wallet_success"
            }
        }
    }
    
    

    /v1/wallet/withdrawal_addresses/:wallet_id [DELETE]

    delete an existing withdrawal address

    Path Parameters

    Response

    Get Withdrawal Frozen Status

    Sample Response

    {
        "success": true,
        "result": {
            "withdrawal_frozen": false,
            "withdrawal_frozen_2": {
                "frozen": true,
                "blockers": [
                    {
                           "expire_at": "2018-05-23T04:20:50.304063Z",
                           "action": "activity_change_password"
                    },
                    {
                           "expire_at": "2018-05-23T04:20:22.27859Z",
                           "action": "activity_disable_two_fa"
                    }
                ]
            }
        }
    }
    
    

    /v1/wallet/withdrawal_frozen [GET]

    Check whether withdrawal is blocked because of recent suspicious account activities. Activities which can cause withdrawal to be temporarily blocked include changing password, resetting password, disabling two-factor authentication.

    Response

    Create Withdrawal

    Sample Request

    {
        "address" : "GRIUAMSEAKOGECZYTPXLECJPFUOS9URIJZOBHTDVQDOTVWJKNPLCAPXFMGTD9CNUFNP9EEVBIISRCVEIYMNVIPSTJX",
        "currency": "ETH",
        "amount": "0.4",
        "ledger_type": "exchange",
        "use_cob_as_fee": true,
        "memo": "abc"
    }
    
    

    Sample Response

    {
        "success": true,
        "result": {
            "2fa": {
                "type": "totp",
                "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
            }
        }
    }
    
    

    /v1/wallet/withdrawals [POST]

    Create a withdrawal. Users must have 2FA enabled to use it.

    Request

    Response

    Get withdrawal fee

    Sample Request

    {
        "address" : "0x29aa9730b11950a311febe0a566afa2dbd804bdb",
        "currency": "ETH",
        "amount": "0.4",
        "ledger_type": "coblet"
    }
    
    

    Sample Response

    {
        "success": true,
        "result": {
            "fee": {
                "fee": "1",
                "cob_fee": "0.1",
                "is_internal": false
            }
        }
    }
    
    

    /v1/wallet/withdrawals/fee [POST]

    Get withdrawal fee for corresponding payload.

    Request

    Response

    WebSocket Common

    Common Parameters

    Sample Response

    {
        "h": [],
        "d": [],
    }
    
    

    NOTE: all fields are converted to string for correct precision

    Subscribe

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

    Unsubscribe

    Unsubscribe from given channel to reduce unused data stream.

    Version

    Type

    For control response (see sessions below)

    For data response (see sessions below)

    Response

    Error

    Sample Response

    {
        "h": ["", "2", "error", "4002", "channel_not_found"],
        "d": []
    }
    
    

    Error code for the specified error event occured, server will respond an error message including error code.

    Error Code

    Response

    Ping/Pong

    Sample Request

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

    Sample Response

    {
        "h": ["", "2", "pong", "sample_id"],
        "d": []
    }
    
    

    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

    Response

    Subscribe

    Sample Request

    {
        "action": "subscribe",
        "type:": "trade",
        "trading_pair_id": "COB-ETH",
        "id": "sample_id"
    }
    
    

    Sample Response

    {
        "h": ["trade.COB-ETH", "2", "subscribed", "sample_id"],
        "d": []
    }
    
    

    Subscribe topic with specific parameters.

    Request

    Response

    Unsubscribe

    Sample Request

    {
        "action": "unsubscribe",
        "channel_id": "trade.COB-ETH",
        "id": "sample_id"
    }
    
    

    Sample Response

    {
        "h": ["COB-ETH.trade", "2", "unsubscribed", "sample_id"],
        "d": []
    }
    
    

    Unsubscribe topic with channel id or parameters same as subscription.

    Request

    Response

    WebSocket V2

    Candle

    Sample Request

    {
        "action": "subscribe",
        "type": "candle",
        "trading_pair_id": "COB-ETH",
        "timeframe": "1m"
    }
    
    

    Sample Response

    {
        "h": ["candle.COB-ETH.1h", "2", "u"],
        "d":
            [
                ["1513555200000", "100", "0.012", "0.01", "0.01", "0.012"]
            ]
    }
    
    

    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

    Response

    Funding [Auth]

    Sample Request

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

    Sample Response

    {
        "h": ["funding", "2", "u", "1"],
        "d": [
            "ed679c62-bd0e-40ea-bf04-40e3b046c944",
            "1535760000100",
            "0",
            "COB",
            "open",
            "opened",
            "ask",
            "0.01",
            "100",
            "0",
            "2",
            "true"
        ]
    }
    
    

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

    PARAMS

    Type

    Same type enums as Order [Auth]

    Event

    Same event enums as Order [Auth]

    State

    Same state enums as Order [Auth]

    Request

    Response

    Matched loans

    Sample Request

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

    Sample Response

    {
        "h": ["loan.COB", "2", "u"],
        "d":
            [
                [
                    "ed679c62-bd0e-40ea-bf04-40e3b046c944",
                    "1535760000100",
                    "1535760000000",
                    "COB",
                    "open",
                    "opened",
                    "0.01",
                    "100",
                    "2",
                    "true",
                    "ask",
                ]
            ]
    }
    
    

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

    State

    Event

    PARAMS

    Request

    Response

    Loan Ticker

    Sample Request

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

    Sample Response

    {
        "h": ["loan-ticker.COB", "2", "u"],
        "d": [
            [
              "1535760000000",
              "10",
              "0.012",
              "0.01",
              "0.01",
              "0.012"
            ]
        ]
    }
    
    

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

    Request

    Response

    User's loan updates [Auth]

    Sample Request

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

    Sample Response

    {
        "h": ["loan-update", "2", "u"],
        "d":
            [
                [
                    "ed679c62-bd0e-40ea-bf04-40e3b046c944",
                    "1535760000100",
                    "1535760000000",
                    "COB",
                    "open",
                    "created",
                    "0.01",
                    "100",
                    "2",
                    "true",
                    "ask",
                ]
            ]
    }
    
    

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

    Request

    Response

    Order [Auth]

    Sample Request

    {
        // order operation (place)
        "action": "place_order",
        "trading_pair_id": "COB-ETH",
        "type": "0",
        "price": "123.4567",
        "size": "1000.000",
        "side": "bid",
        "source": "exchange",
        "stop_price": "",        // mandatory for stop/stop-limit order
        "trailing_distance": "", // mandatory for trailing-stop order
        "id": "order_req_id1"
    }
    
    

    Sample Request

    {
        // order operation (modify)
        "action": "modify_order",
        "type": "0",
        "order_id": "ed679c62-bd0e-40ea-bf04-40e3b046c944",
        "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"
    }
    
    

    Sample Request

    {
        // order operation (cancel)
        "action": "cancel_order",
        "type": "0",
        "order_id": "ed679c62-bd0e-40ea-bf04-40e3b046c944"
    }
    
    

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

    Action

    Type

    Event

    State

    Side

    Source

    PARAMS

    Request

    Limit Order [Auth]

    Sample Response

    {
        "h": ["order", "2", "u", "0"],
        "d": [
            "ed679c62-bd0e-40ea-bf04-40e3b046c944",
            "1513555200000",
            "1513555200000",
            "COB-ETH",
            "open",
            "opened",
            "ask",
            "0.01",
            "0.0",
            "1000",
            "0.0",
            "exchange"
        ]
    }
    
    

    Response

    Limit Stop Order [Auth]

    Sample Response

    {
        // Limit Stop Order
        "h": ["order", "2", "u", "3"],
        "d": [
            "12345678-5678-90ab-1234-567890abcdec",
            "1513555200001",
            "1513555200010",
            "COB-ETH",
            "filled",
            "executed",
            "ask",
            "0.001",
            "0.0012",
            "1000",
            "",
            "0.001",
            "exchange"
        ]
    }
    
    

    Response

    Market Order [Auth]

    Sample Response

    {
        "h": ["order", "2", "u", "1"],
        "d": [
            "12345678-5678-90ab-1234-567890abcded",
            "1513555200001",
            "1513555200002",
            "COB-ETH",
            "filled",
            "executed",
            "ask",
            "0.0012",
            "1000",
            "0.0012",
            "exchange"
        ]
    }
    
    

    Response

    Stop Order [Auth]

    Sample Response

    {
        "h": ["order", "2", "u", "2"],
        "d": [
            "12345678-5678-90ab-1234-567890abcdec",
            "1513555200001",
            "1513555200010",
            "COB-ETH",
            "filled",
            "executed",
            "ask",
            "0.0012",
            "1000",
            "",
            "0.001",
            "exchange"
        ]
    }
    
    

    Response

    Orderbook

    Sample Request

    {
        "action": "subscribe",
        "type": "order-book",
        "trading_pair_id": "COB-ETH",
        "precision": "1E-6"
    }
    
    

    Sample Response

    {
        "h": ["order-book.COB-ETH.1E-7", "2", "u"],
        "d": {
            "bids": [
                [ "0.01", "1", "1234.56" ]
            ],
            "asks": [
                [ "0.012", "3", "9487.87" ]
            ]
        }
    }
    
    

    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

    Response

    Ticker

    Sample Request

    {
        "action": "subscribe",
        "type": "ticker",
        "trading_pair_id": "COB-ETH"
    }
    
    

    Sample Response

    {
        "h": ["ticker.COB-ETH", "2", "u"],
        "d": [
            [
                "1513555200000",
                "0.01",
                "0.012",
                "100",
                "0.012",
                "0.01",
                "0.01",
                "0.012"
            ]
        ]
    }
    
    

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

    Request

    Response

    Trade

    Sample Request

    {
        "action": "subscribe",
        "type": "trade",
        "trading_pair_id": "COB-ETH"
    }
    
    

    Sample Response

    {
        "h": ["trade.COB-ETH", "2", "u"],
        "d":
            [
                ["ed679c62-bd0e-40ea-bf04-40e3b046c944", "1513555200000", "ask", "0.01", "100"]
            ]
    }
    
    

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

    PARAMS

    Request

    Response