RikSchoonbeek / crypto-prices

0 stars 0 forks source link

find a way to store possible trading pairs per exchange, as each crypto available at an exchange can probably only be traded against a select amount of other crypto's, not against all others that are available on the exchange. #5

Closed RikSchoonbeek closed 5 years ago

RikSchoonbeek commented 5 years ago

Maybe by adding a new table which stores the tradable pairs:

RikSchoonbeek commented 5 years ago

Finished first version of management command to add trade pair data still needs to be executed and tested

NOW: write a management command that will test if the pair data is added correctly

RikSchoonbeek commented 5 years ago
RikSchoonbeek commented 5 years ago

I am now executing test_save_available_trading_pairs

And it seems to work, but I see an error in test_pairs_exchange_pks_mirror_pair_exchanges:

Setting the amount of trading pairs to be tested by this method to 100 I get the following result printed to the console:

Pair: Ethereum - Yen
- Pair.exchanges: ['Kraken']
- Exch_pk_exchanges: ['Kraken', 'Kraken']
Pair: Ethereum - US Dollar
- Pair.exchanges: ['Bittrex', 'Kraken']
- Exch_pk_exchanges: ['Bittrex', 'Kraken', 'Kraken']

For some reason Kraken's name is double.

Although it's not always the case:

Pair: Tezos (Pre-Launch) - Canadian Dollar
- Pair.exchanges: ['Kraken']
- Exch_pk_exchanges: ['Kraken']
RikSchoonbeek commented 5 years ago

Decided to rewrite the management commands written untill now, this time do it test driven