Skip to main content

Installation

You can install the SDK using npm from the GitHub repository:

Basic Usage

To avoid ambiguity, we denote the smallest possible multiple of USDC (0.000001 USDC) as one uusdc, which stands for µUSDC (micro-USDC), and denote the smallest possible multiple of a contract (0.01 contract) as one ccontract (centicontract).User-facing USDC balances are specified as fixed-point strings (e.g. "1.2625" for USDC). Contract quantities in the API and SDK are specified as integer ccontracts strings (e.g. "1050" for 10.50 contracts at precision 2).
example.ts

Configuration

The SDK requires only the base URL of the Bison API:

Developer Accounts

If you have a developer account, you can set it at the client level to automatically apply it to all orders:
All orders placed through this client will be associated with your dev account, allowing you to earn a portion of trading fees. See the Developer Accounts guide for more information on how to get a dev account and configure fee structures.

Working with Amounts

The SDK provides utility functions for working with µUSDC amounts:
You can find detailed usage information on the next few pages.