Skip to content

For developers

Jerry edited this page Jun 8, 2023 · 3 revisions

The modular open architecture of the project allows you to use it both as a ready-made solution and in parts when developing your own strategies. See Review chart for reference.

Warning. Coverage of overridden margin strategy-sdk is significant but not complete. Only methods and functions required for normal operation of the presented strategy are implemented. Missing functionality can be implemented on yours own or on request.

Easy way

If you want to develop 'margin style' strategy, use template from margin repository. In this way you can use it both independently (STANDALONE mode) and together with margin.de

Independent way

A fully independent strategy that can be used on exchanges that are supported by the exchanges-wrapper. Description and examples of use referenced above.

Known issue

STANDALONE mode:

  • None

With margin.de:

  • Not work more than one Python bot at the same time with "pure virtual function" error after some time. You can use new instance for new pair
  • Sometimes skips the partial fill signal from the margin layer
  • Sometimes fill signal from the margin come with a delay, for temp fix use EXTRA_CHECK_ORDER_STATE = True
  • When you STOP strategy from margin terminal, close and then restart it, the strategy is started without approval and restore (can be duplicated) orders. If you want planed restart martin-binance - delete state.db in./margin folder before restart.