DeviaVir / zenbot

Zenbot is a command-line cryptocurrency trading bot using Node.js and MongoDB.
MIT License
8.21k stars 2.04k forks source link

bug fee #1193

Closed msalek closed 6 years ago

msalek commented 6 years ago

fee amount not work in live mode !

System information

Source code / logs

live mode

[ { order_id: '5490873711',
    time: 1516562333908,
    execution_time: 198458,
    slippage: 0.0021004016064257026,
    type: 'buy',
    size: '0.01128816',
    fee: 0,
    price: '12476.15000000',
    order_type: 'maker',
    cancel_after: 'day' },
  { order_id: '5490722095',
    time: 1516561068609,
    execution_time: 32587,
    slippage: 0.004797018069848473,
    type: 'sell',
    size: '0.01149371',
    fee: 0,
    price: '12341.00000000',
    order_type: 'maker',
    id: '426d77dd',
    selector: 'cexio.BTC-USD',
    session_id: 'bfb3d6f9',
    mode: 'live' } ]

and sim

{ order_id: undefined,
    time: 1516414861000,
    execution_time: 29000,
    slippage: 0.00045,
    type: 'buy',
    size: '1.61444417',
    fee: 0.0025831106720000004,
    price: '12356.55795000',
    order_type: 'maker',
    cancel_after: 'day' },
  { order_id: undefined,
    time: 1516416006000,
    execution_time: 62000,
    slippage: 0.0018156031188254703,
    type: 'sell',
    size: '1.60702546',
    fee: 31.84390218472552,
    price: '12384.64440100',
    order_type: 'maker' },
defkev commented 6 years ago

Whats your trade volume on CEX?

Sim uses fixed fees will live/paper uses your own.

defkev commented 6 years ago

nvm...looks like you found a bug

Looking at the code the fee only gets calculated in paper/sim mode 💩

Its not a game breaker as live mode always uses the balance reported by the exchange.

I'll look into it.