Websocket API

Xinxi Wang edited this page Apr 23, 2017 · 38 revisions
Clone this wiki locally

Table of Contents

Connection

Establish a connection

  • Websocket endpoint: wss://wsapi.coinut.com
  • Protocol: beta
  • Requests per second shall not exceed 30; otherwise the connection will be closed.

Heartbeats

Heartbeats can be used to maintain a connection or check the status of a connection.

Request

{"request":"hb","nonce":363747232}

Reply

{
   "nonce":363747232,
   "reply":"hb",
   "status":[
      "OK"
   ]
}

Nonce

Each request should contain a monotonically increasing 32-bit unsigned integer nonce. Replies for a request contain the request's nonce. Therefore, nonce can be used to track the replies for a particular request.

Spot Trading

Get spot trading instruments

Request

{"request": "inst_list", "sec_type": "SPOT", "nonce": 391166762}

Response

{
   "SPOT":{
      "LTCBTC":[
         {
            "base":"LTC",
            "inst_id":1,
            "decimal_places":5,
            "quote":"BTC"
         }
      ],
      "ETHBTC":[
         {
            "quote":"BTC",
            "base":"ETH",
            "decimal_places":5,
            "inst_id":2
         }
      ]
   },
   "nonce":391166762,
   "reply":"inst_list",
   "status":[
      "OK"
   ]
}
  • inst_id, the id of the instrument, will stay the same in one websocket session but may change occasionally. You may confirm the correctness by checking the trading pair name like LTCBTC or the base and quote currencies.
  • decimal_places is the number of decimal places of the price.

Get realtime ticks

Request

{"request":"inst_tick","inst_id":1, "subscribe": true, "nonce":615146544}
  • subscribe is only needed when you need updates when new ticks are generated; otherwise, don't set it.
  • once you start to subscribe the ticks for one instrument, use this request with subscribe set as false to unsubscribe.

Reply

{
  "highest_buy": "750.58100000",
  "inst_id": 1,
  "last": "752.00000000",
  "lowest_sell": "752.00000000",
  "open_interest": "0.00000000",
  "reply": "inst_tick",
  "timestamp": 1481355058109705,
  "trans_id": 170064,
  "volume": "0.07650000",
  "volume24": "56.07650000"
}
  • For spot instruments, open_interest is always 0 and should be ignored.
  • volume is the total volume since the launch of the exchange
  • volume24 gives the trading volume of the last 24 hours

Get orderbooks in realtime

Request

{"request":"inst_order_book","inst_id":1, "subscribe": true, "nonce":704114816}
  • inst_id is required
  • subscribe is optional. It's needed only if you need incremental updates.
  • To unsubscribe, use this request with subscribe set as false.

Response

The server will immediately return a snapshot of the current orderbook as the following:

{
  "buy":
   [ { "count": 7, "price": "750.00000000", "qty": "0.07000000" },
     { "count": 1, "price": "751.00000000", "qty": "0.01000000" },
     { "count": 1, "price": "751.34500000", "qty": "0.01000000" } ],
  "sell":
   [ { "count": 6, "price": "750.58100000", "qty": "0.06000000" },
     { "count": 1, "price": "750.58200000", "qty": "0.01000000" },
     { "count": 1, "price": "750.58300000", "qty": "0.01000000" } ],
  "inst_id": 1,
  "nonce": 704114816,
  "total_buy": "67.52345000",
  "total_sell": "0.08000000",
  "reply": "inst_order_book",
  "status": [ "OK" ]
}

After that, whenever the orderbook changes, the server will push incremental updates (if subscribe is set as true in the request):

{ "count": 7,
  "inst_id": 1,
  "price": "750.58100000",
  "qty": "0.07000000",
  "total_buy": "120.06412000",
  "reply": "inst_order_book_update",
  "side": "BUY",
  "trans_id": 169384
}

To use the incremental update, first find an entry in the original orderbook with the same price field, and then replace that entry with this new update if qty is not 0. If qty is 0, the original entry needs to be deleted. If no such entry is found, insert this update into the original orderbook.

Instead of keeping track of the full orderbook, we can also use aggregated ones.

{
   "request":"inst_order_book",
   "inst_id":1,
   "decimal_places":2,
   "top_n":10,
   "subscribe":true,
   "nonce":704114816
}
  • top_n can be any of 10, 50, 100, and 200. It indicates how many entries of the buy/sell side of the orderbook should be returned.
  • decimal_places indicates how many decimal places shall be used for prices.
  • incremental updates are also adjusted according to the top_n and decimal_places.

Get market trades

Request

{"request":"inst_trade", "subscribe": true, "inst_id":1,"nonce":450319518}
  • subscirbe is only needed if you need incremental updates.

Response

A snapshot will be returned immediately from the server.

{
  "nonce": 450319518,
  "reply": "inst_trade",
  "status": [
    "OK"
  ],
  "trades": [
    {
      "price": "750.00000000",
      "qty": "0.01000000",
      "side": "BUY",
      "timestamp": 1481193563288963,
      "trans_id": 169514
    },
    {
      "price": "750.00000000",
      "qty": "0.01000000",
      "side": "BUY",
      "timestamp": 1481193345279104,
      "trans_id": 169510
    },
    {
      "price": "750.00000000",
      "qty": "0.01000000",
      "side": "BUY",
      "timestamp": 1481193333272230,
      "trans_id": 169506
    },
    {
      "price": "750.00000000",
      "qty": "0.01000000",
      "side": "BUY",
      "timestamp": 1481193007342874,
      "trans_id": 169502
    }]
}

And updates will come after that (Some updates may come before the snapshot. You may check the trans_id field for the chronological order of them):

{
  "inst_id": 1,
  "price": "750.58300000",
  "reply": "inst_trade_update",
  "side": "BUY",
  "timestamp": 0,
  "trans_id": 169478
}

Authentication

Request

{
   "request":"login",
   "username":"test",
   "password":"Abcdefg12345",
   "nonce":829055385
}

If you enabled two-factor authentication for your account, you will need to proivde an OTP field as well like the following:

{
   "request":"login",
   "username":"test",
   "password":"Abcdefg12345",
   "otp": "545848",
   "nonce":829055385
}

Reply

{
   "api_key":"b46e658f-d4c4-433c-b032-093423b1aaa4",
   "country":"NA",
   "email":"tester@test.com",
   "failed_times":0,
   "lang":"en_US",
   "nonce":829055385,
   "otp_enabled":false,
   "products_enabled":[
      "SPOT",
      "FUTURE",
      "BINARY_OPTION",
      "OPTION"
   ],
   "reply":"login",
   "session_id":"f8833081-af69-4266-904d-eea088cdcc52",
   "status":[
      "OK"
   ],
   "timezone":"Asia/Singapore",
   "unverified_email":"",
   "username":"test"
}

The session_id field can be used to login again if your connection dropped and needs to reconnect. This avoids user interaction if your two-factor authentication is enabled. To achieve that, just use the following request. Please notice that session_id only last one hour after you disconnect.

{
   "request":"login",
   "username":"test",
   "session_id":"f8833081-af69-4266-904d-eea088cdcc52",
   "nonce":829055385
}

Get Account Balance

Request

{
  "nonce": 3062542,
  "request": "user_balance"
}

Reply

{
  "nonce": 3062542,
  "status": [
    "OK"
  ],
  "BTC": "192.46630415",
  "LTC": "6000.00000000",
  "ETC": "800.00000000",
  "ETH": "496.99938000",
  "floating_pl": "0.00000000",
  "initial_margin": "0.00000000",
  "realized_pl": "0.00000000",
  "maintenance_margin": "0.00000000",
  "equity": "192.46630415",
  "reply": "user_balance",
  "trans_id": 15159032
}
  • If you only trade spots, floating_pl, initial_margin, realized_pl, maintenance_margin, and equity can be ignored.

Submit an order

Request

{
   "request":"new_order",
   "nonce": 956475204,
   "inst_id":1,
   "price":"750.581",
   "qty":"0.01",
   "client_ord_id":50001345,
   "side":"SELL"
}
  • inst_id is the id of the instrument returned by the inst_list API.
  • price is the price for a limit order. Market orders do not need this field.
  • qty is the quantity you that want to buy or sell.
  • client_ord_id is an arbitrary unsigned 32-bit integer that is used by the client to identify the order
  • side BUY/SELL

Response

There are three kinds of responses: accepted, filled, and rejected.

(i) Accepted

If an order cannot be fully filled immediately but may be able to be filled later, the order will be inserted into the exchange's orderbook, and a reply with order_accepted will be returned to the user. This only applies to a limit order. A market order will never receive an order_accepted reply.

   {
      "nonce":956475204,
      "status":[
         "OK"
      ],
      "order_id":1,
      "open_qty": "0.01",
      "inst_id":1,
      "qty":"0.01",
      "client_ord_id": 50001345,
      "order_price":"750.581",
      "reply":"order_accepted",
      "side":"SELL",
      "trans_id":127303
   }
(ii) Filled

If an order is partially or fully filled, order_filled replies will be returned. The format is like the following:

  {
    "commission": {
      "amount": "0.00799000",
      "currency": "USD"
    },
    "fill_price": "799.00000000",
    "fill_qty": "0.01000000",
    "nonce": 9753459,
    "order": {
      "client_ord_id": 12345,
      "inst_id": 2,
      "open_qty": "0.00000000",
      "order_id": 721923,
      "price": "748.00000000",
      "qty": "0.01000000",
      "side": "SELL",
      "timestamp": 1482903034617491
    },
    "reply": "order_filled",
    "status": [
      "OK"
    ],
    "timestamp": 1482903034617491,
    "trans_id": 20859252
  }

One order may be filled at different price levels. And each fill will generate a single order_fill reply. Unfilled market orders will be rejected immediately. Unfilled limit orders will remain in the orderbook.

(iii) Rejected

An order may be rejected because of various reasons. For example, an order that requires too much balance to open will be rejected with a NOT_ENOUGH_BALANCE error; an unfilled market order will be rejected with a NOT_ENOUGH_LIQUIDITY error; an order with invalid price will be rejected with an INVALID_PRICE error. The following gives a complete list of possible errors:

UNKNOWN_ERROR
INVALID_INSTRUMENT
INST_EXPIRED
INVALID_PRICE
INVALID_QUANTITY
NOT_ENOUGH_BALANCE
NOT_ENOUGH_LIQUIDTY
INVALID_CLIENT_ORD_ID

The format of order_reject replies is as the following.

{
    "nonce": 275825966,
    "status": [
        "OK"
    ],
    "order_id": 7171,
    "open_qty": "100000.00000000",
    "price": "750.60000000",
    "inst_id": 2,
    "reasons": [
        "NOT_ENOUGH_BALANCE"
    ],
    "client_ord_id": 4,
    "timestamp": 1482080535098689,
    "reply": "order_rejected",
    "qty": "100000.00000000",
    "side": "BUY",
    "trans_id": 3282993
}

Submit orders in batch mode

Liquidity providers may need to submit multiple orders at once. This API enables that.

Request

{
   "request":"new_orders",
   "nonce":621701555,
   "orders":[
      {
         "inst_id":1,
         "price":"750.581",
         "qty":"0.01",
         "client_ord_id":50001345,
         "side":"SELL"
      },
      {
         "inst_id":1,
         "price":"750.321",
         "qty":"0.01",
         "client_ord_id":50001346,
         "side":"BUY"
      }
   ]
}
  • orders array shall include all orders' information. The maximum number of orders per batch should not exceed 1000.

Response

[
  {
    "nonce": 621701555,
    "status": [
      "OK"
    ],
    "order_id": 331,
    "open_qty": "0.01000000",
    "price": "750.58100000",
    "inst_id": 1,
    "client_ord_id": 50001345,
    "timestamp": 1490713990542441,
    "reply": "order_accepted",
    "qty": "0.01000000",
    "side": "SELL",
    "trans_id": 15155495
  },
  {
    "nonce": 621701555,
    "status": [
      "OK"
    ],
    "order_id": 332,
    "open_qty": "0.01000000",
    "price": "750.32100000",
    "inst_id": 1,
    "client_ord_id": 50001346,
    "timestamp": 1490713990542441,
    "reply": "order_accepted",
    "qty": "0.01000000",
    "side": "BUY",
    "trans_id": 15155497
  }
]
  • Orders are executed one by one following the order in the request.
  • The response is an array containing each order's result.

Get open orders

Request

{"request": "user_open_orders", "nonce": 1234, "inst_id": 1}
  • inst_id specifies the instrument of the open orders that you want to get.

Response

{
    "nonce": 237368387,
    "reply": "user_open_orders",
    "status": [
        "OK"
    ],
    "orders": [
        {
            "order_id": 35,
            "open_qty": "0.01000000",
            "price": "750.58200000",
            "inst_id": 1,
            "client_ord_id": 4,
            "timestamp": 1481138766081720,
            "qty": "0.01000000",
            "side": "BUY"
        },
        {
            "order_id": 30,
            "open_qty": "0.01000000",
            "price": "750.58100000",
            "inst_id": 1,
            "client_ord_id": 5,
            "timestamp": 1481137697919617,
            "qty": "0.01000000",
            "side": "BUY"
        }
    ]
}

Accepted orders will also become part of the user's open orders. Therefore, to incrementally update the user's open orders list, first use this user_open_orders request, and then listen to order_accepted messages. There is no need to subscribe or unsubscribe order_accepted messages. They are always delivered to all websocket connections belonging to the user.

Cancel an order

Request

{"request":"cancel_order","inst_id":1,"order_id":39,"nonce":547201672}
  • inst_id and order_id are all required.

Response

If successful, the result is similar to following

  {
    "nonce": 547201672,
    "reply": "cancel_order",
    "status": [
      "OK"
    ]
  }

Cancel orders in batch mode

Request

{
   "request":"cancel_orders",
   "entries":[
      {
         "inst_id":1,
         "order_id":332
      },
      {
         "inst_id":1,
         "order_id":329
      }
   ],
   "nonce":547201672
}
  • The maximum number of orders can be canceled in one request is 1000.

Response

{
  "nonce": 8940659,
  "reply": "cancel_orders",
  "status": [
    "OK"
  ],
  "results": [
    {
      "order_id": 329,
      "status": "OK",
      "inst_id": 1
    },
    {
      "order_id": 332,
      "status": "OK",
      "inst_id": 1
    }
  ],
  "trans_id": 15166063
}
  • The results field contains each order's cancel request result.

Get your history trades

Request

{"request":"trade_history","inst_id":1,"start":1,"limit":2,"nonce":326181726}
  • start and limit are for pagination and are optional. The default value for start is 0, and limit 100.

Reply

{
  "nonce": 326181726,
  "reply": "trade_history",
  "status": [
    "OK"
  ],
  "total_number": 261,
  "trades": [
    {
      "commission": {
        "amount": "0.00000100",
        "currency": "BTC"
      },
      "order": {
        "client_ord_id": 297125564,
        "inst_id": 1,
        "open_qty": "0.00000000",
        "order_id": 721327,
        "price": "1.00000000",
        "qty": "0.00100000",
        "side": "SELL",
        "timestamp": 1482490337560987
      },
      "fill_price": "1.00000000",
      "fill_qty": "0.00100000",
      "timestamp": 1482490337560987,
      "trans_id": 10020695
    },
    {
      "commission": {
        "amount": "0.00000100",
        "currency": "BTC"
      },
      "order": {
        "client_ord_id": 297118937,
        "inst_id": 1,
        "open_qty": "0.00000000",
        "order_id": 721326,
        "price": "1.00000000",
        "qty": "0.00100000",
        "side": "SELL",
        "timestamp": 1482490330557949
      },
      "fill_price": "1.00000000",
      "fill_qty": "0.00100000",
      "timestamp": 1482490330557949,
      "trans_id": 10020514
    }
  ]
}

order_filled messages should be incorporated as incremental updates of history trades.

Derivative Trading

Derivative trading uses all APIs for spot trading. Besides those, there are a few more APIs specific to derivative trading.

Get the underlying index ticks

The Bitcoin price used for settling the derivatives is indicated by XBTCUSD. It's an aggregation of major Bitcoin exchanges's prices.

Request

{"request":"index_tick","asset":"XBTCUSD", "subscrube": true, "nonce":943640764}
  • To obtain the tick once instead of subscribing, remove the subscribe field.
  • To unsubscribe, use this request with subscribe set as false.

Reply

{
   "asset":"XBTCUSD",
   "price":"779.20722200",
   "reply":"index_tick",
   "timestamp":1481768258595336
}

If subscribed, ticks like this will be streamed to the client continuously.

Get derivative instruments

Request

{"nonce": 426281459, "sec_type": "FUTURE", "request": "inst_list"}
  • sec_type can be FUTURE, OPTION, or BINARY_OPTION.

Reply

{
   "nonce":426281459,
   "reply":"inst_list",
   "FUTURE":{
      "XBTCUSD":{
         "1491696000000000":{
            "1.00000000":{
               "inst_id":138173,
               "decimal_places":4
            }
         },
         "1491091200000000":{
            "1.00000000":{
               "inst_id":71932,
               "decimal_places":4
            }
         }
      }
   },
   "status":[
      "OK"
   ]
}

where 1491696000000000 is the expiry time, 1.00000000 contract size, and 138173 inst_id.

If the request's sec_type is option, a reply like the following will be returned.

{
   "nonce":570339372,
   "reply":"inst_list",
   "status":[
      "OK"
   ],
   "OPTION":{
      "XBTCUSD":{
         "1491696000000000":{
            "PUT":{
               "1.00000000":{
                  "965.00000000":{
                     "conversion_rate": "1024.00000000",
                     "decimal_places":4,
                     "inst_id":138140
                  },
                  "995.00000000":{
                     "conversion_rate": "1024.00000000",
                     "decimal_places":4,
                     "inst_id":141663
                  }
               }
            },
            "CALL":{
               "1.00000000":{
                  "965.00000000":{
                     "conversion_rate": "1024.00000000",
                     "decimal_places":4,
                     "inst_id":138139
                  },
                  "995.00000000":{
                     "conversion_rate": "1024.00000000",
                     "decimal_places":4,
                     "inst_id":141662
                  }
               }
            }
         }
      }
   }
}

where 1491696000000000 is expiry time, 1.00000000 contract size, 965.00000000 strike price. conversion_rate is the rate for converting option payoff to BTC; this is required because our option is denoted using USD but settled in BTC.

For BINARY_OPTION, the result is similar to the above.

Get option chain

An option chain is simply a list of all the put and call options of different strike prices along with other related information for a given expiry time.

To get an option chain, the following request can be used:

Request

{
   "request":"option_chain",
   "sec_type":"BINARY_OPTION",
   "asset":"XBTCUSD",
   "expiry_time":1481889600000000,
   "subscribe":true,
   "nonce":779772099
}
  • sec_type can be "BINARY_OPTION" or "OPTION".

Reply

First, a snapshot will be sent to the client:

{
  "status": [
    "OK"
  ],
  "expiry_time": 1481889600000000,
  "nonce": 779772099,
  "reply": "option_chain",
  "sec_type": "BINARY_OPTION",
  "asset": "XBTCUSD",
  "entries": [
    {
      "CALL": {
        "highest_buy": "0.00000000",
        "inst_id": 472619,
        "last": "0.00000000",
        "lowest_sell": "0.00000000",
        "open_interest": "0.00000000",
        "volume": "0.00000000"
      },
      "PUT": {
        "highest_buy": "0.00000000",
        "inst_id": 472620,
        "last": "0.00000000",
        "lowest_sell": "0.00000000",
        "open_interest": "0.00000000",
        "volume": "0.00000000"
      },
      "strike": "700.00000000"
    },
    {
      "CALL": {
        "highest_buy": "0.00000000",
        "inst_id": 472621,
        "last": "0.00000000",
        "lowest_sell": "0.00000000",
        "open_interest": "0.00000000",
        "volume": "0.00000000"
      },
      "PUT": {
        "highest_buy": "0.00000000",
        "inst_id": 472622,
        "last": "0.00000000",
        "lowest_sell": "0.00000000",
        "open_interest": "0.00000000",
        "volume": "0.00000000"
      },
      "strike": "701.00000000"
    }
  ]
}

where every entry in the option chain describes both a call and a put of the same strike price.

After that, incremental updates will be sent as the following:

{
  "asset": "XBTCUSD",
  "expiry_time": 1481889600000000,
  "highest_buy": "0.00000000",
  "inst_id": 472790,
  "last": "1.00000000",
  "lowest_sell": "1.00000000",
  "open_interest": "6.00000000",
  "reply": "option_chain_update",
  "sec_type": "BINARY_OPTION",
  "timestamp": 1481888526933966,
  "trans_id": 2766859,
  "volume": "6.00000000"
}

Get history positions

Request

{
   "request":"position_history",
   "sec_type":"BINARY_OPTION",
   "start":0,
   "limit":100,
   "nonce":907741043
}

Reply

The result is like the following. The positions field gives very position's position_id, inst, open_timestamp, and the detailed fills/settlement records generated whenever the position gets updated. If the record is for a fill, then information like fill_price, fill_qty, and commission are included. If the record is for settlement, asset_at_expiry and commission are then included.

{
   "nonce":170162413,
   "positions":[
      {
         "position_id":1,
         "records":[
            {
               "commission":{
                  "currency":"BTC",
                  "amount":"0.00010000"
               },
               "fill_price":"0.00100000",
               "trans_id":9908,
               "fill_qty":"1.00000000",
               "position":{
                  "commission":{
                     "currency":"BTC",
                     "amount":"0.00010000"
                  },
                  "timestamp":1491685910492503,
                  "open_price":"0.00100000",
                  "realized_pl":"-0.00100000",
                  "qty":"1.00000000"
               }
            },
            {
               "commission":{
                  "currency":"BTC",
                  "amount":"0.00000000"
               },
               "asset_at_expiry":"1180.12451000",
               "trans_id":12123,
               "position":{
                  "commission":{
                     "currency":"BTC",
                     "amount":"0.00010000"
                  },
                  "timestamp":1491686104676754,
                  "open_price":"0.00100000",
                  "realized_pl":"0.00900000",
                  "qty":"0.00000000"
               }
            }
         ],
         "inst":{
            "expiry_time":1491686100000000,
            "contract_size":"0.01000000",
            "conversion_rate": "1024.00000000",
            "option_type":"CALL",
            "inst_id":56,
            "sec_type":"BINARY_OPTION",
            "asset":"XBTCUSD",
            "strike":"1179.80000000"
         },
         "open_timestamp":1491685910492503
      }
   ],
   "status":[
      "OK"
   ],
   "total_number":1,
   "reply":"position_history"
}

Get open orders

Request

{
   "request":"user_open_orders",
   "nonce":314395326,
   "sec_type":"BINARY_OPTION"
}

Reply

{
    "nonce": 314395326,
    "reply": "user_open_orders",
    "status": [
        "OK"
    ],
    "orders": [
        {
            "order_id": 722575,
            "open_qty": "1.00000000",
            "price": "0.00500000",
            "inst_id": 1561736,
            "client_ord_id": 411835349,
            "timestamp": 1483464040290725,
            "qty": "1.00000000",
            "side": "SELL"
        },
        {
            "order_id": 722576,
            "open_qty": "1.00000000",
            "price": "0.00500000",
            "inst_id": 1561736,
            "client_ord_id": 411837384,
            "timestamp": 1483464042292130,
            "qty": "1.00000000",
            "side": "SELL"
        },
    ],
    "trans_id": 34284509
}

Get open positions

Request

Positions of an instrument can be retrieved through the following request

{"request": "user_open_positions", "inst_id": 65971, "nonce": 590172445}

where inst_id can be replaced by other instrument properties to form a more general query. Those properties can be: sec_type, asset, expiry_time, strike, contract_size, and option_type.

For example, to query the user's option positions instead of future/binary option positions, the following request can be used.

{"request": "user_open_positions", "sec_type": "OPTOIN"}

Reply

{
   "nonce":590172445,
   "positions":[
      {
         "position_id":1,
         "commission":{
            "currency":"BTC",
            "amount":"0.00010000"
         },
         "open_price":"0.00100000",
         "realized_pl":"0.00900000",
         "qty":"0.00000000",
         "open_timestamp":1481527299023844,
         "inst_id":65971
      }
   ],
   "status":[
      "OK"
   ],
   "trans_id":495852,
   "reply":"user_open_positions"
}

Whenever a position is created/changed/exercised, a user_position_update message will be sent to the client. The format of the messages are as the following

Position created/quantity changed
{
    "nonce": 590172445,
    "position": [
        {
            "position_id": 1,
            "cost": "0.01000000",
            "qty": "1.00000000",
            "open_timestamp": 1481527299023844,
            "inst_id": 65971
        }
    ],
    "status": [
        "OK"
    ],
    "trans_id": 495852,
    "reply": "user_position_update"
}
Position exercised
{
    "nonce": 590172445,
    "position": [
        {
            "position_id": 1,
            "cost": "0.01000000",
            "qty": "1.00000000",
            "open_timestamp": 1481527299023844,
            "inst_id": 65971
        }
    ],
    "asset_at_expiry": "951.53451200",
    "status": [
        "OK"
    ],
    "trans_id": 495852,
    "reply": "user_position_update"
}