Commit Graph
14044 Commits
Author SHA1 Message Date
Adeel Khan 29c951fbca ADD: GATEIO md_provider with dynamic contract specs using Batch REST call 2025-05-22 16:17:19 +00:00
Adeel Khan ae776cf75f ADD: GATEIO md_provider with dynamic contract specs 1 REST call per Contract 2025-05-22 16:17:19 +00:00
Adeel Khan f353a8e9fd ADD: GATEIO md_provider with default contract specs 2025-05-22 16:17:19 +00:00
John Colvin 24f4c2bb27 Add gateio_dev config profile for Adeel 2025-05-21 04:15:30 +00:00
John Colvin 2960f19e60 cleanup: Remove unused spark.conf file
Originally, this spark.conf was hardcoded into compose.yaml, and copied
into the sparkd container on each deploy. It hasn't been used since
config profiles were introduced.
2025-05-21 04:15:30 +00:00
John Colvin 653d96675b Add py_dummy_md config profile to test py md plugin 2025-05-21 04:15:30 +00:00
John Colvin ae2aacdb1c deploy: Move configurations to new stutter dir "app_sparkd" 2025-05-21 04:15:30 +00:00
John Colvin 11a741eea5 Add protos for gateio 2025-05-21 04:15:30 +00:00
John Colvin 56d0217aad Add protos for bybit 2025-05-21 04:15:30 +00:00
John Colvin 992b922d68 build: Move onix fix adapter to its own lib
We should keep order execution dependencies out of lib_spark.
2025-05-21 04:14:12 +00:00
John Colvin b1103d5edb fix build: Move OnixsUtils to from lib_spark to app_sparkd
They're only needed MDP3Main.cpp and ICEMain.cpp. We're one step closer
to removing lib_spark's dependency on onixs.
2025-05-21 04:14:12 +00:00
John Colvin 1289992127 cleanup: Remove unnecessary onixs include from TrafixOrderStateHandler.h 2025-05-21 04:14:12 +00:00
John Colvin 239548774a feat: Support python md plugins 2025-05-21 04:14:12 +00:00
John Colvin d0b0ca42ab Add "clear" fn to Book & BookSide
Prelude to python market data bindings
2025-05-21 04:14:12 +00:00
John Colvin 51882570bd Add "smart" parse fns for a couple proto enums
Prelude to python market data bindings. Unlike the normal parse fns, the
"smart" variants aren't case sensitive, and can match strings with or
without TYPE_NAME_ prefixes.
2025-05-21 04:14:12 +00:00
John Colvin 3ad95cf0ae build: Move okx execution to its own lib 2025-05-21 04:14:12 +00:00
John Colvin 02bcbb900a cleanup: Remove unnecessary onixs include from IDGenerator.h 2025-05-21 04:14:12 +00:00
John Colvin d8efc38eeb cleanup: Remove unnecessary includes from MDP3Listener.h 2025-05-21 04:14:12 +00:00
John Colvin a51143c94b refactor: Organize libspark proj w/ stuttering include
This new structure provides several benefits:

* Allows us to install multiple CMake projects in the same destination
  dir (without include path conflicts).
  - This makes shipping the trading algo sdk a trivial excercise. Simply
    copy the lib and include dirs from the install dest. That's it!
* Puts us in a position to break up the monolithic libspark into smaller
  modules, which are easier to manage.

Windows specific notes:

* Get rid of unnecessary script vs_filters.cmake
* Define WebsocketConnectionGateway directly in cs (instead of proto)
  - The proto would no longer be in the include path passed to protoc.
    Moving it to c# because there wasn't a compelling reason for it to
    be a proto in the first place.
* Set spark output prefix to "lib" on windows
  - So we get "libspark.dll" instead of "spark.dll", which conflicts
    with the csharp lib, "Spark.dll".
* Copy libspark.dll to net8.0 & net8.0-windows in a single cmake build
  target

fix build: Copy libspark to both dirs net8.0, net8.0-windows
2025-05-21 04:14:09 +00:00
John Colvin 5e401d49ac cleanup: Move TradeSummarySignalDispatcher to libspark
It is needed by TradeSummarySignal, which is in libspark. This prevents a
circular dependency from libspark -> sparkd.
2025-05-20 20:20:07 +00:00
John Colvin 2761a52636 build: Clean up protobuf cmake scripts
Make them more flexible, reusable. This is a precursor to porting over
python md provider code from another branch.
2025-05-20 20:20:07 +00:00
John Colvin b2f6421b1e build: Rename external path vars w/ "EXTERNAL_" prefix in cmake
The old "SPARK_" prefix felt like a misnomer.
2025-05-20 20:20:07 +00:00
John Colvin 236ab31fbc Add a few arithmetic ops to TimeSpan 2025-05-20 20:20:07 +00:00
John Colvin 83b77c9fc0 diag: Log time it takes to start md sources
So we can detect bottlenecks
2025-05-20 20:20:07 +00:00
John Colvin 9930b65ddc refactor: Split MarketDataGateway up into providers/sources
MarketDataGateway still exists, but is greatly simplified. It creates
several `IMarketDataProvider`s, each of which generates a list of
`IMarketDataSource`s. The market data sources provide market data to an
`IMarketDataListener`.

* EmumbaMarketDataProvider
* CCApiMarketDataProvider
* PyMarketDataProvider
* OnixsMarketDataProvider
* ReplayMarketDataProvider

As a side effect, individual py market data sources are now explicitly
limited to a single venue (it probably should have been this way all
along, since the shared memory writers do not expect updates to involve
multiple venues).
2025-05-20 20:20:07 +00:00
John Colvin 33093f3497 cleanup: Remove dependency on quickfix for string to_lower
We shouldn't depend on external libs for trivial things like converting
strings to lower case. Dependencies come at a cost. They add baggage in
the form of internal dependencies and increased build time.
2025-05-20 20:20:07 +00:00
John Colvin 5ad7755b28 tool: Make open orders symbol param optional in binance.env 2025-05-20 20:08:34 +00:00
John Colvin df4ca124c3 cleanup: Remove redundant script get_binance_md.sh
I should have removed this when I added binance_rest_client.sh
2025-05-20 20:08:34 +00:00
John Colvin 2c8b9ee288 tool: Add envsource.fish to load .env files in fish 2025-05-20 20:08:34 +00:00
John Colvin f02f28e347 tool: Add a few vars to binance.env 2025-05-20 20:08:34 +00:00
John Colvin c8a89c1e8d cleanup: Rename get_binance_md.py -> binance_client.py
This is a more appropriate name (it's not just md anymore).
2025-05-20 20:08:34 +00:00
John Colvin 7ae9e07a30 tool: Use binance.env file in python client
Like the bash impl (binance_rest_client.sh), it gets urls, params
(templates), and api credentials from env vars.
2025-05-20 20:08:34 +00:00
Taha a130e47218 Arb Scoring stream 2025-05-20 00:24:17 -04:00
John Colvin a377f6de7f improvement (ui): Use sec qty display settings in rec report 2025-05-19 12:35:25 -04:00
John Colvin 855373c9e6 cleanup: Remove unnecessary code 2025-05-19 15:57:35 +00:00
John Colvin e1b535b633 feat: Sync exch positions in binance usds futs gw 2025-05-19 15:57:35 +00:00
John Colvin 3b9ac71460 refactor: Abstract out start/stop state machine for gen use
* From binance usds futures gateway
* Thread-safe
* Handles re-entrancy gracefully
2025-05-19 15:57:35 +00:00
John Colvin 9a5075daaf improvement: Use recursive_mutex in ws client to prevent deadlocks 2025-05-19 15:57:35 +00:00
John Colvin 4e7fe811a8 Add ConcurrentUnorderedMap (c++) 2025-05-19 15:57:35 +00:00
Taha 0a6733180d Added SpreadStatsStream 2025-05-18 01:10:33 -04:00
Taha f2169c6bd4 Adding more data to SpreadPerformanceStream 2025-05-16 01:42:32 -04:00
Taha 23ef478391 Spread analytics streams 2025-05-15 15:01:27 -04:00
John Colvin 236a5a9362 fix: Format binance order price up to 5 decimal places
Bugs (fixed):
  * Binance JELLYUSDT order prices get rounded to 4 decimal places, even
    though the price tick is 0.00001
2025-05-13 15:02:02 +00:00
John Colvin cb560bbe33 fix: Sum realized & unrealized pnl correctly in header rows v3.0.6 2025-05-08 14:13:02 -04:00
John Colvin 248f2644ca deploy: Automatically restart "sparkd-symbols" service
This is what we deploy to the alphaworx-zen-hk-live server
v3.0.5
2025-05-07 14:49:53 +00:00
arham b87d86f4d6 FIx: okx exe user cancel should be cxl not rjct 2025-05-07 08:38:28 +00:00
arham 8515196dcb Add: okx exe fok orders working 2025-05-07 08:08:40 +00:00
Taha Afzal e5e042f016 Spreader in RH mode now fires FOK, and hedges only whne the FOK is completely filled (ie not as we we might get partial fills) 2025-05-07 06:12:48 +00:00
John Colvin da3593326d Enable FOK orders at binance 2025-05-06 22:20:46 +00:00
John Colvin 313d3a2377 Enable FOK in EMNativeOrder.cpp
This class was originally designed for Emumba execution at deribit
(hence the "EM" prefix), but now serves all crypto exchanges.
2025-05-06 22:19:11 +00:00