Skip to main content
Deno 2 is finally here 🎉️
Learn more

Exchange Connectors

This module shall provide a range of Exchange Connectors.

Centralized Exchanges (CEXes)

Bybit

See also the Bybit Example Client and Bybit Connector for more usage examples.

import { IExchangeConnector } from "../interfaces/exchange-connector-interface.ts"
import { BybitConnector } from "./bybit-connector.ts"

export class ExampleClient {

    private exchangeConnector: IExchangeConnector

    public constructor(private aPIKey: string, private aPISecret: string) {
        this.exchangeConnector = new BybitConnector(apiKey, apiSecret)
    }

    public async showUsageExamples(): Promise<void> {
        const accountInfo = await this.exchangeConnector.getFuturesAccountData()
        console.log(accountInfo)
        const positions = await this.exchangeConnector.getPositions()
        console.log(positions)
    }
}

const apiKey = Deno.args[0]
const apiSecret = Deno.args[1]

const exampleClient = new ExampleClient(apiKey, apiSecret)

await exampleClient.showUsageExamples()

Decentralized Exchanges (CEXes)