triangular_arbitrage_bot/src
nicolas 03b5daa003 migrate: absorb all executor functions into fused_engine (C)
Replace the Python executor with direct C execution in a dedicated
executor thread. Removes UDS JSON serialization, Python async
overhead, and the 2+ms pipeline gap between signal creation and
order fire.

New components:
- src/rest_client.c/h: Keepalive HTTPS, HMAC-SHA256 signing,
  order_place, order_test, Content-Length response parsing
- src/fill_handler.c/h: SPSC ring buffer for WS match events,
  hot thread -> executor thread fill dispatch
- src/executor.c/h: execute_triangle() cascade, fee hold
  reduction, increment floor, paper mode simulation, PnL,
  concurrency isolation, reporting

Modified:
- src/ws_client.c: Subscribe to tradeOrdersV2 + account.balance,
  dispatch orderChange match events to fill SPSC, private token
  fetch via bullet-private, token cleared on reconnect
- src/http_client.c: Added https_post_auth() for signed POST
- src/events.c: Cold thread replaced with executor thread
  (poll on wake_fd + fill_fd, direct execution)
- config.yaml.example: initial_capital moved to fused_engine,
  added cooldown_seconds, kcs_discount_active

Removed:
- src/kucoin_sign.c/h (redundant with http_client.c helpers)
2026-05-26 19:54:41 -03:00
..
CMakeLists.txt Add initial triangular arbitrage bot 2026-05-24 16:12:04 -03:00
book.c docs: add docstrings to ~50 undocumented functions across C source files 2026-05-24 23:32:33 -03:00
book.h Add initial triangular arbitrage bot 2026-05-24 16:12:04 -03:00
cJSON.c Add initial triangular arbitrage bot 2026-05-24 16:12:04 -03:00
cJSON.h Add initial triangular arbitrage bot 2026-05-24 16:12:04 -03:00
config.c Add initial triangular arbitrage bot 2026-05-24 16:12:04 -03:00
config.h Add initial triangular arbitrage bot 2026-05-24 16:12:04 -03:00
evaluate.c fix: cross-leg increment floor, ceiling-to-floor rounding, balance WS subscription, order-level logging 2026-05-25 20:21:19 -03:00
evaluate.h Add initial triangular arbitrage bot 2026-05-24 16:12:04 -03:00
events.c migrate: absorb all executor functions into fused_engine (C) 2026-05-26 19:54:41 -03:00
events.h Add initial triangular arbitrage bot 2026-05-24 16:12:04 -03:00
executor.c migrate: absorb all executor functions into fused_engine (C) 2026-05-26 19:54:41 -03:00
executor.h migrate: absorb all executor functions into fused_engine (C) 2026-05-26 19:54:41 -03:00
fill_handler.c migrate: absorb all executor functions into fused_engine (C) 2026-05-26 19:54:41 -03:00
fill_handler.h migrate: absorb all executor functions into fused_engine (C) 2026-05-26 19:54:41 -03:00
hash.c docs: add docstrings to ~50 undocumented functions across C source files 2026-05-24 23:32:33 -03:00
hash.h Add initial triangular arbitrage bot 2026-05-24 16:12:04 -03:00
http_client.c migrate: absorb all executor functions into fused_engine (C) 2026-05-26 19:54:41 -03:00
http_client.h migrate: absorb all executor functions into fused_engine (C) 2026-05-26 19:54:41 -03:00
http_server.c docs: add docstrings to ~50 undocumented functions across C source files 2026-05-24 23:32:33 -03:00
http_server.h Add initial triangular arbitrage bot 2026-05-24 16:12:04 -03:00
jsmn.h Add initial triangular arbitrage bot 2026-05-24 16:12:04 -03:00
log.c docs: add docstrings to ~50 undocumented functions across C source files 2026-05-24 23:32:33 -03:00
log.h Add initial triangular arbitrage bot 2026-05-24 16:12:04 -03:00
main.c docs: add docstrings to ~50 undocumented functions across C source files 2026-05-24 23:32:33 -03:00
queue.c Add initial triangular arbitrage bot 2026-05-24 16:12:04 -03:00
queue.h Add initial triangular arbitrage bot 2026-05-24 16:12:04 -03:00
rest_client.c migrate: absorb all executor functions into fused_engine (C) 2026-05-26 19:54:41 -03:00
rest_client.h migrate: absorb all executor functions into fused_engine (C) 2026-05-26 19:54:41 -03:00
symbols_api.c docs: add docstrings to ~50 undocumented functions across C source files 2026-05-24 23:32:33 -03:00
symbols_api.h refactor: move order sizing to engine, simplify executor 2026-05-24 17:49:09 -03:00
triangle.c Add initial triangular arbitrage bot 2026-05-24 16:12:04 -03:00
triangle.h refactor: move order sizing to engine, simplify executor 2026-05-24 17:49:09 -03:00
ws_client.c migrate: absorb all executor functions into fused_engine (C) 2026-05-26 19:54:41 -03:00
ws_client.h migrate: absorb all executor functions into fused_engine (C) 2026-05-26 19:54:41 -03:00