Gunthy

GUNBOT: The automatic profit generator => Technical Support & Development => Topic started by: Hampden on June 11, 2020, 04:06:57 PM

Title: GB won't sell USD-LINK with TradingView Add-On, works fine with BTC, ETH, XTZ
Post by: Hampden on June 11, 2020, 04:06:57 PM
I hope someone can help me with this issue.

I've set up alerts for my strategy in TradingView and am trading 5 pairs:  USD-BTC, USD-ETH, USD-XTZ, USD-ADA, and USD-LINK

I've tested each alert by making the condition true.  Orders are received in my IMAP acct.  Gunbot reads and parses the emails and the console descriptions appear similar:

Failed LINK Sell:
Code: [Select]
Nothing to fetch
emailParsed { timestamp: 1591833875838,
  type: 'sell',
  pair: 'USD-LINK',
  price: undefined,
  exchange: 'binanceus',
  tl: undefined }

2020/06/10 17:04:36: Looking for pending orders...

2020/06/10 17:04:36: Checking prices...

2020/06/10 17:04:37: Received a sell order...
Nothing to fetch
[ minSize: undefined,
  precision: { base: 8, quote: 4, amount: 2, price: 4 } ]
Original price: 4.4212
Original volume: 11.32
Sell Order Opts: { pair: 'LINK/USD', type: 'SELL', price: 4.4212, amount: '11.32' }
{}

┌────────────────────┬────────────────────┬───────────┬─────────────┬──────────────┬─────────────────┐
│ ɢՍƝ฿Ǿͳ RT Edition  │ Version            │ Exchange  │ Pair        │ Cycle        │                 │
├────────────────────┼────────────────────┼───────────┼─────────────┼──────────────┤                 │
│ TradingView Plugin │ v18.8.8            │ binanceus │ USD-LINK    │ SELL         │                 │
├────────────────────┼────────────────────┼───────────┼─────────────┼──────────────┼─────────────────┤
│                    │ Ask                │ Bid       │ Balance USD │ Balance LINK │ BreakEven Point │
├────────────────────┼────────────────────┼───────────┼─────────────┼──────────────┼─────────────────┤
│                    │ 4.4212             │ 4.43      │ 28182.303   │ 11.31837     │                 │
├────────────────────┼────────────────────┼───────────┴─────────────┴──────────────┴─────────────────┤
│ Callback           │  SELL order placed │                                                          │
└────────────────────┴────────────────────┴──────────────────────────────────────────────────────────┘
------------------------------------------------------------------------------------------------
 ɢƱͶƁםŁ TradingView Edition -  Waiting for alerts...2020/06/10 17:04:38
------------------------------------------------------------------------------------------------
Nothing to fetch
Nothing to fetch

Successful ADA Sell:
Code: [Select]
Nothing to fetch
emailParsed { timestamp: 1591833513591,
  type: 'sell',
  pair: 'USD-ADA',
  price: undefined,
  exchange: 'binanceus',
  tl: undefined }

2020/06/10 16:58:34: Looking for pending orders...

2020/06/10 16:58:34: Checking prices...

2020/06/10 16:58:35: Received a sell order...
Nothing to fetch
[ minSize: undefined,
  precision: { base: 8, quote: 4, amount: 1, price: 4 } ]
Original price: 0.0836
Original volume: 598.8
Sell Order Opts: { pair: 'ADA/USD', type: 'SELL', price: 0.0836, amount: '598.8' }
{ info:
   { symbol: 'ADAUSD',
     orderId: 13887177,
     orderListId: -1,
     clientOrderId: 'x-BCU53SPJeg7m5kwwefrkfpjc1z4ut',
     transactTime: 1591833515853,
     price: '0.0000',
     origQty: '598.80000000',
     executedQty: '598.80000000',
     cummulativeQuoteQty: '50.0596',
     status: 'FILLED',
     timeInForce: 'GTC',
     type: 'MARKET',
     side: 'SELL',
     fills: [ [Object] ] },
  id: '13887177',
  timestamp: 1591833515853,
  datetime: '2020-06-10T23:58:35.853Z',
  lastTradeTimestamp: undefined,
  symbol: 'ADA/USD',
  type: 'market',
  side: 'sell',
  price: 0.08359986639946561,
  amount: 598.8,
  cost: 50.05967999999999,
  average: 0.0836,
  filled: 598.8,
  remaining: 0,
  status: 'closed',
  fee: { cost: 0.00215446, currency: 'BNB' },
  trades:
   [ { info: [Object],
       timestamp: undefined,
       datetime: undefined,
       symbol: 'ADA/USD',
       id: undefined,
       order: undefined,
       type: undefined,
       takerOrMaker: undefined,
       side: undefined,
       price: 0.0836,
       amount: 598.8,
       cost: 50.05967999999999,
       fee: [Object] } ] }

┌────────────────────┬────────────────────┬───────────┬─────────────┬─────────────┬─────────────────┐
│ ɢՍɃםŦ RT Edition  │ Version            │ Exchange  │ Pair        │ Cycle       │                 │
├────────────────────┼────────────────────┼───────────┼─────────────┼─────────────┤                 │
│ TradingView Plugin │ v18.8.8            │ binanceus │ USD-ADA     │ SELL        │                 │
├────────────────────┼────────────────────┼───────────┼─────────────┼─────────────┼─────────────────┤
│                    │ Ask                │ Bid       │ Balance USD │ Balance ADA │ BreakEven Point │
├────────────────────┼────────────────────┼───────────┼─────────────┼─────────────┼─────────────────┤
│                    │ 0.0836             │ 0.0837    │ 28182.3478  │ 598.8       │                 │
├────────────────────┼────────────────────┼───────────┴─────────────┴─────────────┴─────────────────┤
│ Callback           │  SELL order placed │                                                         │
└────────────────────┴────────────────────┴─────────────────────────────────────────────────────────┘
------------------------------------------------------------------------------------------------
 ɢՍƁǾŁ TradingView Edition -  Waiting for alerts...2020/06/10 16:58:36
------------------------------------------------------------------------------------------------
Nothing to fetch
Nothing to fetch

One difference I see is that after the line "Sell Order Opts: { pair: ...", the ADA sell had a long description about the execution.  The Link sell only had "{}"

I wonder if the word LINK is a command that is not being parsed properly as such?

Has anyone else had this issue?
Title: Re: GB won't sell USD-LINK with TradingView Add-On, works fine with BTC, ETH, XTZ
Post by: Exquitas on June 12, 2020, 10:07:59 AM
Hi there,

Actually it's a rounding issue which will require a fix.

Your bot has sent this to the exchange:
Original volume: 11.32

While your Link balance is actually this:
11.31837 

We're on it to get it fixed asap.
Title: Re: GB won't sell USD-LINK with TradingView Add-On, works fine with BTC, ETH, XTZ
Post by: Exquitas on June 12, 2020, 02:43:10 PM
Update: Our devs have found the issue and fixed it. It'll be included in the next stable release (or PM me to get the link to the channel where beta builds are getting shared)
Title: Re: GB won't sell USD-LINK with TradingView Add-On, works fine with BTC, ETH, XTZ
Post by: Hampden on June 12, 2020, 07:24:53 PM
Thank you for your speedy reply.  I'll get it at the next release.
Title: Re: GB won't sell USD-LINK with TradingView Add-On, works fine with BTC, ETH, XTZ
Post by: Exquitas on June 13, 2020, 10:43:13 AM
You're welcome!  :)
Title: Re: GB won't sell USD-LINK with TradingView Add-On, works fine with BTC, ETH, XTZ
Post by: Hampden on June 22, 2020, 08:40:10 PM
A friend just ran into a similar issue with USD-ETH.  Here is a copy of his sell on the console:

Code: [Select]
ɢՍҊɮǾŁ TradingView Edition -  Waiting for alerts...
emailParsed { timestamp: 1592854085629,
  type: 'sell',
  tl: undefined,
  pair: 'USD-ETH',
  exchange: 'binanceus',
  price: undefined }

2020/06/22 12:28:07: Looking for pending orders...
ɢՍҊɮǾŁ TradingView Edition -  Waiting for alerts...

2020/06/22 12:28:08: Checking prices...

2020/06/22 12:28:09: Received a sell order...
[ minSize: undefined,
  precision: { base: 8, quote: 4, amount: 5, price: 2 } ]
Original price: 242.34
Original volume: 11.07187
Sell Order Opts: { pair: 'ETH/USD',
  type: 'SELL',
  price: 242.34,
  amount: '11.07187' }
{}

┌────────────────────┬────────────────────┬───────────┬─────────────┬─────────────┬─────────────────┐
│ ɢƱŋʘŦ RT Edition  │ Version            │ Exchange  │ Pair        │ Cycle       │                 │
├────────────────────┼────────────────────┼───────────┼─────────────┼─────────────┤                 │
│ TradingView Plugin │ v18.8.8            │ binanceus │ USD-ETH     │ SELL        │                 │
├────────────────────┼────────────────────┼───────────┼─────────────┼─────────────┼─────────────────┤
│                    │ Ask                │ Bid       │ Balance USD │ Balance ETH │ BreakEven Point │
├────────────────────┼────────────────────┼───────────┼─────────────┼─────────────┼─────────────────┤
│                    │ 242.34             │ 242.89    │ 367.7741    │ 11.071868   │                 │
├────────────────────┼────────────────────┼───────────┴─────────────┴─────────────┴─────────────────┤
│ Callback           │  SELL order placed │                                                         │
└────────────────────┴────────────────────┴─────────────────────────────────────────────────────────┘
------------------------------------------------------------------------------------------------
 ɢՍɮŦ TradingView Edition -  Waiting for alerts...2020/06/22 12:28:09
------------------------------------------------------------------------------------------------
ɢՍҊɮǾŁ TradingView Edition -  Waiting for alerts...
ɢՍҊɮǾŁ TradingView Edition -  Waiting for alerts...

I believe he had a balance on BinanceUS with 2.6 digits and the order was sent in 2.5 digits.