Platform-neutral
A single TypeScript API for trading crypto, stocks, forex, commodities and more on any trading platform.
import { connect, } from "@reiryoku/mida";
// Connect to a Binance account
const myAccount = await connect("Binance/Spot", {
apiKey: "***",
apiSecret: "***",
});
import { MidaOrderDirection, } from "@reiryoku/mida";
// Buy 1 Bitcoin
const myOrder = await myAccount.placeOrder({
symbol: "BTCUSDT",
direction: MidaOrderDirection.BUY,
volume: 1,
});
Approachable
A clean, simple and intuitive TypeScript API with first-class documentation.
Versatile
A complete and incrementally adoptable ecosystem that scales between a library and a full-featured ecosystem.
import { marketComponent, } from "@reiryoku/mida";
const MyComponent = marketComponent({
async tick (tick) {
// Fired when there is a market tick
console.log(tick.bid);
console.log(tick.ask);
},
async periodUpdate (period) {
// Fired when a last live candlestick is updated
},
async periodClose (period) {
// Fired when a candlestick is closed
},
// Furthermore, specific timeframes can be targeted
async periodClose$M15 (period) {
// Fired when a M15 candlestick is closed
},
async marketOpen () {
// Fired when the market opens
},
async update () {
// Fired when there is any market update of the above
},
});
const myComponent = await MyComponent(myAccount, "#TSLA");