Skip to content
All library documents

Configuring Multiple Exchange Objects for Multi-Asset Crypto Strategies

Article FMZ digest · Author: 善

Summary

This tutorial explains several ways to organize exchange objects in a cryptocurrency strategy. For a strategy that processes multiple trading pairs, it contrasts switching the pair on one exchange object with assigning separate objects to each pair. It then distinguishes multiple configured accounts, including separate accounts at the same venue, from multiple objects that share one account configuration. The examples show how these arrangements affect market data and account access.

The final example applies separate objects to two futures contracts so their quotes and orders can be handled concurrently without repeatedly switching contract types. The author illustrates a spread calculation and a hypothetical hedge when the spread crosses a threshold, and reports that fetching the two quotes took about 50 milliseconds in the demonstrated setup. This is platform-specific implementation guidance rather than evidence of a profitable arbitrage strategy. It does not address fees, funding, execution slippage, fill risk, or whether the example spread threshold is economically viable.

Key ideas

  • A single exchange object can iterate through several trading pairs by changing its selected pair.
  • Separate exchange objects can simplify pair-specific logic while sharing a configured account.
  • Multiple exchange configurations can represent different accounts, even when they are at the same exchange.
  • Separate objects for different futures contracts allow concurrent quote retrieval and order submission.
  • A spread-based hedge example needs further evaluation for costs, fill risk, and market viability.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.