coinbase / coinbase-pro-trading-toolkit

DEPRECATED — The Coinbase Pro trading toolkit
Apache License 2.0
866 stars 239 forks source link

Question: possible to have Trader and LiveOrderbook running simultaneously #254

Closed djflux closed 5 years ago

djflux commented 5 years ago

This question is similar to the one posed in Issue #136 - Newb question here:

I have my feed piped into a LiveOrderbook and it's working with my trading logic, however once the logic thinks it should execute the trade I can't because I have my feed piped into the order book and not the Trader.

Is there a method of accomplishing what I want similar to the Limiter in traderDemos.ts to either executeMessage or placeTrade with my Trader?

Any pointers are extremely welcome :)

Cheers, Flux

djflux commented 5 years ago

For those curious, I created my own class based on the Trader class in the toolkit, instead of having to pipe the gdax-feed into the Trader class. My derived class has public methods to handle the messages provided by LiveOrderbook.

aquaflamingo commented 5 years ago

@djflux would you mind writing a small tutorial or sample to add :)?