From 1ab2e2c8ceb6a84dbb57efd614768ed88f1ab71f Mon Sep 17 00:00:00 2001 From: comachi Date: Fri, 25 Jan 2019 07:52:32 +0900 Subject: [PATCH] =?UTF-8?q?Quoine=20=E3=81=A7=E3=81=AE=20=E7=B4=84?= =?UTF-8?q?=E5=AE=9A=E6=95=B0=E9=87=8F=E7=A2=BA=E8=AA=8D=E3=82=A8=E3=83=A9?= =?UTF-8?q?=E3=83=BC=E3=82=92=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 「TypeError: Cannot read property 'toString' of null」 約定数量確認時に上記エラーが発生した。 対応として - APIで定義されていないレスポンスを、any へ変更した。 - trailing_stop_type、trailing_stop_value については type.ts上ではboolean型で定義されており、APIでは、何も定義されていない。かなり怪しいので定義自体を削除しました。 参考: https://github.com/bitrinjani/r2/issues/149 --- src/Quoine/types.ts | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/Quoine/types.ts b/src/Quoine/types.ts index 973df494..f7797c70 100644 --- a/src/Quoine/types.ts +++ b/src/Quoine/types.ts @@ -34,10 +34,10 @@ export class SendOrderResponse extends Castable { @cast funding_currency: string; @cast crypto_account_id?: any; @cast currency_pair_code: string; - @cast average_price: string; - @cast target: string; + @cast average_price?: any; + @cast target?: any; @cast order_fee: string; - @cast source_action: string; + @cast source_action?: any; @cast unwound_trade_id?: any; @cast trade_id?: any; } @@ -72,15 +72,13 @@ export class OrdersResponse extends Castable { @cast funding_currency: string; @cast crypto_account_id?: any; @cast currency_pair_code: string; - @cast average_price: string; - @cast target: string; + @cast average_price?: any; + @cast target?: any; @cast order_fee: string; - @cast source_action: string; + @cast source_action?: any; @cast unwound_trade_id?: any; - @cast trade_id: string; + @cast trade_id?: any; @cast settings?: any; - @cast trailing_stop_type: boolean; - @cast trailing_stop_value: boolean; @cast @element(Execution) executions: Execution[];