● SDK · Beta / 03
Tribulnation SDK
One interface. Every venue.
Write your strategy once. Swap the venue by changing a string — the order, fill, and position
models stay the same. The Typed Clients do the translation underneath.
# pip install tribulnation-sdk[mexc,dydx]
from tribulnation.sdk import TradingSDK
sdk = TradingSDK()
mexc = await sdk.market('mexc:spot:BTCUSDT')
dydx = await sdk.market('dydx:perp:BTC-USD')
async for trade in mexc.trades_stream():
await dydx.place_order({
'qty': -trade.qty,
'price': trade.price,
})