Description
Quoine に注文後 約定の確認時にエラーが発生し、実際は約定していてもR2からみると約定していないように見えているようです。
具体的にはQuoin買 Coincheck売 の発注をした際、Web上からは両方約定したのが見えたのですが、
R2ではChecking if both legs are done or not...で以下のエラーが発生し、Coincheckで買い戻しされてしまいました。原因ご教示いただけますでしょうか。よろしくお願いします。
R2のコンソール
2018-12-12 23:11:58.002 INFO Expected profit : 1 (0.026%)
2018-12-12 23:11:58.003 INFO >>Found arbitrage oppotunity.
2018-12-12 23:11:58.003 INFO >>Sending order targetting quote Quoine Ask 386,900 0.24...
2018-12-12 23:11:58.005 INFO >>Sending order targetting quote Coincheck Bid 387,000 0.231...
2018-12-12 23:12:00.385 INFO >>Order check attempt 1.
2018-12-12 23:12:00.385 INFO >>Checking if both legs are done or not...
2018-12-12 23:12:00.780 WARN Cannot read property 'toString' of null
2018-12-12 23:12:00.781 WARN >>Pending: Quoine Buy 0.01 BTC sent at 386,900, pending size 0.01 BTC
ログ
018-12-12 23:12:00.662 DEBUG [QuoteAggregator] Aggregator is already running. Skipped iteration.
2018-12-12 23:12:00.779 DEBUG [WebClient] Response from https://api.quoine.com/orders/633540160. Status Code: 200 (OK)
2018-12-12 23:12:00.779 DEBUG [WebClient] Response content from https://api.quoine.com/orders/633540160: {"id":633540160,"order_type":"limit","quantity":"0.01","disc_quantity":"0.0","iceberg_total_quantity":"0.0","side":"buy","filled_quantity":"0.01","price":386900,"created_at":1544623921,"updated_at":1544623921,"status":"filled","leverage_level":1,"source_exchange":"QUOINE","product_id":5,"product_code":"CASH","funding_currency":"JPY","crypto_account_id":null,"currency_pair_code":"BTCJPY","average_price":386900,"target":"spot","order_fee":"0.0","source_action":"manual","unwound_trade_id":null,"trade_id":null,"settings":null,"trailing_stop_type":null,"trailing_stop_value":null,"executions":[{"id":75811780,"quantity":"0.01","price":"386900.0","taker_side":"sell","created_at":1544623921,"my_side":"buy"},{"id":75811780,"quantity":"0.01","price":"386900.0","taker_side":"sell","created_at":1544623921,"my_side":"buy"}],"stop_triggered_time":null}
2018-12-12 23:12:00.780 WARN [PairTrader] Cannot read property 'toString' of null
2018-12-12 23:12:00.780 DEBUG [PairTrader] TypeError: Cannot read property 'toString' of null
at OrdersResponse.convert (C:\Users\aaa\r2\node_modules@bitr\castable\dist\castable.js:41:31)
at Castable.Object.getOwnPropertyNames.forEach.propertyKey (C:\Users\aaa\r2\node_modules@bitr\castable\dist\castable.js:28:38)
at Array.forEach ()
at new Castable (C:\Users\aaa\r2\node_modules@bitr\castable\dist\castable.js:24:44)
at new OrdersResponse (C:\Users\aaa\r2\dist\Quoine\types.js:140:1)
at BrokerApi. (C:\Users\aaa\r2\dist\Quoine\BrokerApi.js:37:20)
at Generator.next ()
at fulfilled (C:\Users\aaa\r2\dist\Quoine\BrokerApi.js:4:58)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
2018-12-12 23:12:00.781 WARN [PairTrader] >>Pending: Quoine Buy 0.01 BTC sent at 386,900, pending size 0.01 BTC
2018-12-12 23:12:00.781 INFO [PairTrader] >>Filled: Coincheck Sell 0.01 BTC filled at 387,310
2018-12-12 23:12:00.830 DEBUG [PositionService] Refreshing positions...