zlq4863947 / triangular-arbitrage

数字货币-三角套利机器人
GNU General Public License v3.0
630 stars 229 forks source link

运行项目报错: Argument of type 'string' is not assignable to parameter of type 'number'. #37

Closed xiaoxin233 closed 6 years ago

xiaoxin233 commented 6 years ago

src/lib/api-handler.ts:41:72 - error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'.

41 return await api.createOrder(order.symbol, order.type, order.side, String(order.amount), String(order.price));

zlq4863947 commented 6 years ago

嗯 你升级ccxt了吧? 新版好像要传number类型的, 你改成number试试

xiaoxin233 commented 6 years ago

嗯,是npm install时自动升级了依赖包。新版的ccxt需要传number类型