# connect()

Connects to a trading account.
To create a trading account, check the supported trading platforms.

TIP

Mida is platform-neutral, this means that virtually any trading platform could be easily integrated in the engine. Applications built with Mida can be easily executed on different trading platforms

  • Binance Example
import { connect, } from "@reiryoku/mida";

// Connect to a Binance account
const myAccount = await connect("Binance/Spot", {
    apiKey: "***",
    apiSecret: "***",
});

Read how to use Mida with Binance to get your apiKey and apiSecret credentials.

  • cTrader Example
import { connect, } from "@reiryoku/mida";

// Connect to a cTrader account
const myAccount = await connect("cTrader", {
    clientId: "***",
    clientSecret: "***",
    accessToken: "***",
    accountId: "***",
});

Read how to use Mida with cTrader to get your clientId, clientSecret, accessToken and accountId credentials.

  • Bybit Example
import { connect, } from "@reiryoku/mida";

// Connect to a Bybit account
const myAccount = await connect("Bybit/Futures", {
    apiKey: "***",
    apiSecret: "***",
});

Read how to use Mida with Bybit to get your apiKey and apiSecret credentials.

  • Multiple accounts Example
import { connect, } from "@reiryoku/mida";

const myAccount1 = await connect("Binance/Spot", { ... });
const myAccount2 = await connect("cTrader", { ... });
const myAccount3 = await connect("Bybit/Futures", { ... });