[TECH TUT] Updating a old exchange integration to Gekko 0.6+
#1
This is a technical guide that explains how to migrate legacy exchange wrapper files to new Gekko Broker wrapper files used by Gekko +0.6. This is meant for technical contributors to Gekko who want to update an old exchange integration into Gekko. This isn't an exact guide but it roughly covers the things you need to fix.

All exchange wrappers can be found here: https://github.com/askmike/gekko/tree/de...e/wrappers

- All files ending with .js.old are old wrappers not updated yet.
- All files ending with .js are new wrappers not are working with Gekko 0.6 or higher.

If you want to update an outdated wrapper you need to do a few things:

- Remove all requires to any files outside the `gekko/exchange` directory, such as log and util (the wrappers are now part of a standalone library called Gekko Broker).
- Some function signatures have changed, such as:
  - checkOrder: the callback needs to be passed on object describing partial fills & order rejection
  - cancelOrder: the callback needs to be passed err as well as a "filled" boolean and optionally more data regarding partial fills.
- Error handling works different now, you need to create a function that will handle correct (non error result) and you will need to create a global function that will process the exchange SDK output and normalize error types for the new retry system.

You can look at existing updated implementations for example, and be sure to check out the wrapper reference here: https://gekko.wizb.it/docs/extending/add...hange.html
  Reply


Messages In This Thread
[TECH TUT] Updating a old exchange integration to Gekko 0.6+ - by askmike - 11-26-2018, 11:34 AM

Forum Jump:


Users browsing this thread: