Cinderella-Man / hedgehog

Source code for the "Hands-on Elixir & OTP: Cryptocurrency Trading Bot" course
https://www.youtube.com/playlist?list=PLxsE19GnjC5Nv1CbeKOiS5YqGqw35aZFJ
88 stars 18 forks source link

Using Binance demo exchange #1

Closed gottfrois closed 3 years ago

gottfrois commented 3 years ago

Hey mate, great work with your videos! I was wondering if you managed to use the Binance demo exchange? I tried without success as it looks like no orders are generated even from very common symbols...

Maybe I missed something, if you managed to make it work, I would love some insights or even a video about it as I think it's important to evolve in a safe demo account when working on this project rather than on the real thing.

Thanks!

Cinderella-Man commented 3 years ago

Hi @gottfrois

Thank you for your comment :heart:

One of the viewers commented about the demo exchange(Binance testnet - https://testnet.binance.vision/) last year.

There are a few important details to consider when using the Binance testnet:

Because of the above, almost nobody uses it which is visible by looking at order book(list of all currently placed/active orders) on any popular symbol for example BTCUSDT: https://testnet.binance.vision/api/v3/depth?symbol=BTCUSDT

At the moment of writing this response there are no "bids" (buy orders; so there won't be any trades ever, so nothing on the socket for the most traded symbol on Binance):

{
  "lastUpdateId":115938,
  "bids":[],
  "asks":[
     ["40000.00000000","0.32495000"],
     ["40768.00000000","0.00100000"],
     .....
   ]
}

I do agree that it's important for this exercise/project for people to be able to play around without even opening a Binance account - sadly I realized it a little bit late in the series. In the 7th episode ("Mocking the Binance exchange") I went through creating a mock of Binance so nobody needs to have an account with Binance to follow along. You can't "revert back the time" with YouTube sadly, I managed to get BinanceMock much sooner inside the book - so there were lessons learnt from this.

I hope that makes sense,

Best of luck and thanks again for creating an issue