scrtlabs / catalyst

An Algorithmic Trading Library for Crypto-Assets in Python
http://enigma.co
Apache License 2.0
2.49k stars 725 forks source link

CCXT integration documentation (or tutorial) request #136

Open jbheron opened 6 years ago

jbheron commented 6 years ago

Dear Catalyst Maintainers,

Before I tell you about my issue, let me describe my environment:

Environment

Now that you know a little about me, let me tell you about the issue I am having:

Description of Issue

Congrats on the ccxt integration, that seems like a wonderful step forward in terms of interoperability of Catalyst with a larger number of exchanges, particularly for live-trading. I read that note about the integration in the Release Notes, but would love to know a little more.

In that regard, this issue is perhaps a docs issue. Specifically, here are some examples of the type of help I would hope for this issue to address:

Here is how you can reproduce this issue on your machine:

Reproduction Steps

1. 2. 3. ...

What steps have you taken to resolve this already?

googling? ...

Anything else?

...

Sincerely, $ whoami

fredfortier commented 6 years ago

Great point! We like the level of activity of the CCXT project. We respect their development team. This is a decision which we hope will allow our platform to stay current with exchanges on the long run. In practice, CCXT lives in the background but I agree that there are considerations worth documenting. We'll be able to develop this documentation very shortly, probably next week.

jbheron commented 6 years ago

Wonderful! Well, as a technical writer (at Ripple), I'm happy to review the docs you prepare, and I really appreciate the quick response. Looking forward to a little better understanding of the integration (as I'm not a developer, more hack-n-slash key masher). :-)

fredfortier commented 6 years ago

Oh nice! We'd certainly appreciate that! Let me get back to you in a few days.

In a nutshell, the Catalyst API is similar to the Quantopian Zipline API. We actually expanded upon their documentation. Placing orders, fetching data, etc is done with the Catalyst API which sometimes uses CCXT in the background. That said, in context of an algorithm, it is possible to access a CCXT exchange object directly: ccxt_exchange = context.exchanges['binance'].api. This is only useful for advanced use cases. In most cases the Catalyst API is sufficient and essential for seamless performance tracking.