/beaxy-api-client

TypeScript/JavaScript client for Beaxy Exchange APIs

Primary LanguageTypeScriptOtherNOASSERTION

Beaxy API Client

NPM Version build

⚠️ Note: this is a prerelease version and things might change quite a bit before version 1.0.0, so you should use exact version as your dependency to avoid unexpected (potentially breaking) changes ⚠️


❗ If you encounter any issues related to actual APIs, please be in touch with official Beaxy Exchange support via https://beaxy.com/support

Unofficial Beaxy Exchange API Client written in TypeScript with runtime type validation (io-ts).

Beaxy Exchange trading API client is based on the newer API documented here: https://docs.beaxy.com

Beaxy Exchange public API client is based on the API documented here: https://beaxyapiv2.docs.apiary.io

Install

# npm
npm i beaxy-api-client

# yarn
yarn add beaxy-api-client

Usage

import { publicApi, tradingApi } from 'beaxy-api-client'

const doMagicWithOrderBook = async (symbolName: string) => {
  const book = await publicApi.getOrderBook(symbolName)
  // ...do something
}

const buyMarket = async (symbol: string, quantity: number) => {
  await tradingApi.placeOrder({
    symbol,
    quantity,
    side: 'buy',
    type: 'market'
  })
}

License

MIT - Copyright 2021 Niklas Engblom (niklas-e)