Slide 1

Slide 1 text

Building Cross-Exchange Trading Library with OpenAPI / AsyncAPI `Sho Kaneko CEO, Repoch Indie Hacker, Rustascean

Slide 2

Slide 2 text

Sho Kaneko 2019 embedded rust developer / running hardware product prototyping agency 2023 started doing open-source trading in rusttransitioned to crypto trading software rust 2024 80% contracting rust project,20% open-source trading software100% digital nomad / indie hacker intro trading project hurdles solution inspired by embedded leveraging AsyncAPI useful tools power of opensource

Slide 3

Slide 3 text

doc-first integration Russian boss who doesn’t speak Intelligent CTO intro trading project hurdles solution inspired by embedded leveraging AsyncAPI useful tools power of opensource REST WebSocket Events/Signals Strategy REST WebSocket Ledger Backtest Get Market Data Place Order reading inaccurate / unmaintained API document testing parsers figuring out cross-exchange trading execution 20-50% of the dev time spent on

Slide 4

Slide 4 text

cross-exchange trading libraries Russian boss who doesn’t speak Intelligent CTO intro trading project hurdles solution inspired by embedded leveraging AsyncAPI useful tools power of opensource Opinionated doesn’t fit into actual software design requirements Rust Wrapper on Javascript/Python (like fr?) Less people using Rust not leveraging the Python community Javascript Python Rust

Slide 5

Slide 5 text

what we want for a cross exchange trading library Russian boss who doesn’t speak Intelligent CTO intro trading project hurdles solution inspired by embedded leveraging AsyncAPI useful tools power of opensource opensource native python support library, not a framework code-gen clients Sounds familiar as embedded software engineer…

Slide 6

Slide 6 text

Idea from embedded to trading: arduino Russian boss who doesn’t speak Intelligent CTO intro trading project hurdles solution inspired by embedded leveraging AsyncAPI useful tools power of opensource above: application below arduino: h/w support

Slide 7

Slide 7 text

Idea from embedded to trading: above the abstraction Russian boss who doesn’t speak Intelligent CTO intro trading project hurdles solution inspired by embedded leveraging AsyncAPI useful tools power of opensource Arduino Uno R3

Slide 8

Slide 8 text

Idea from embedded to trading: below the abstraction Russian boss who doesn’t speak Intelligent CTO intro trading project hurdles solution inspired by embedded leveraging AsyncAPI useful tools power of opensource “All of them run the same code, Can’t we do the same thing for crypto trading?”

Slide 9

Slide 9 text

key to openness: abstraction Russian boss who doesn’t speak Intelligent CTO intro trading project hurdles solution inspired by embedded leveraging AsyncAPI useful tools power of opensource arduino hardware abstraction layer (HAL)e.g. GPIO, UART, I2C, SPI, PWM espressif BSP/HAL Flash driver nrf52 BSP/HAL LCD display driver smartwatch, fleet management, 3D printer memory map memory map above: application below arduino: h/w support

Slide 10

Slide 10 text

key to openness: abstraction Russian boss who doesn’t speak Intelligent CTO intro trading project hurdles solution inspired by embedded leveraging AsyncAPI useful tools power of opensource trading abstraction layere.g. order placement, fetch market data Hyperliquid local orderbook Binance BSP/HAL trading signals strategy, backtesting, reporting REST/ WS Client REST/ WS Client above: application below:CEX support OpenAPI / AsyncAPI OpenAPI / AsyncAPI

Slide 11

Slide 11 text

guilder: the trading abstraction Russian boss who doesn’t speak Intelligent CTO intro trading project hurdles solution inspired by embedded leveraging AsyncAPI useful tools power of opensource trading.yaml guilder.py guilder.r s Domain Specific Language (DSL) “get L2 orderbook”, “get funding rate” “place order”, “check current balance”

Slide 12

Slide 12 text

guilder: the trading abstraction Russian boss who doesn’t speak Intelligent CTO intro trading project hurdles solution inspired by embedded leveraging AsyncAPI useful tools power of opensource trading.py trading.rs trading.yaml ongoing implemented local orderbook sync adding backtesting, visualization porting cyclic arbitrage code

Slide 13

Slide 13 text

exchange-collection: OpenAPI / AsyncAPI collection Russian boss who doesn’t speak Intelligent CTO intro trading project hurdles solution inspired by embedded leveraging AsyncAPI useful tools power of opensource OpenAP I(REST) AsyncAP I(WS) client code api testing tools gathered 3 exchanges(binance, coinbase, hyperliquid) building client code-gen CI adding AsyncAPI WS codegen

Slide 14

Slide 14 text

useful tool #1: API viewer Russian boss who doesn’t speak Intelligent CTO intro trading project hurdles solution inspired by embedded leveraging AsyncAPI useful tools power of opensource https://repoch.co/exchange-collection/ OpenAP I(REST) AsyncAP I(WS)

Slide 15

Slide 15 text

useful tool #2: client codegen Russian boss who doesn’t speak Intelligent CTO intro trading project hurdles solution inspired by embedded leveraging AsyncAPI useful tools power of opensource OpenAP I(REST) AsyncAP I(WS) janky, but I can rebuild it because it is open source

Slide 16

Slide 16 text

google it or (re)build it Russian boss who doesn’t speak Intelligent CTO intro trading project hurdles solution inspired by embedded leveraging AsyncAPI useful tools power of opensource fixing OpenAPI REST client codegen adding AsyncAPI WS client codegen (maybe) add extensions to OpenAPI / AsyncAPI

Slide 17

Slide 17 text

useful tool #2: client codegen Russian boss who doesn’t speak Intelligent CTO intro trading project hurdles solution inspired by embedded leveraging AsyncAPI useful tools power of opensource Rust Trading Bot Dev https://discord.gg/nabHXUN9RS Q&A

Slide 18

Slide 18 text

future integration pipeline:code-first approach Russian boss who doesn’t speak Intelligent CTO intro trading project hurdles solution inspired by embedded leveraging AsyncAPI useful tools power of opensource appendix

Slide 19

Slide 19 text

future integration pipeline:api-first approach Russian boss who doesn’t speak Intelligent CTO intro trading project hurdles solution inspired by embedded leveraging AsyncAPI useful tools power of opensource 200USD OpenAPI150USD AsyncAPI1 doc per week ?

Slide 20

Slide 20 text

future integration pipeline:code-first approach Russian boss who doesn’t speak Intelligent CTO intro trading project hurdles solution inspired by embedded leveraging AsyncAPI useful tools power of opensource poem and poem-openapi

Slide 21

Slide 21 text

OpenAPI tools Russian boss who doesn’t speak Intelligent CTO intro trading project hurdles solution inspired by embedded leveraging AsyncAPI useful tools power of opensource

Slide 22

Slide 22 text

AsyncAPI tools Russian boss who doesn’t speak Intelligent CTO intro trading project hurdles solution inspired by embedded leveraging AsyncAPI useful tools power of opensource