Skip to content

Configuration

Initialization

The SDK has two initialization modes:

Read-only (public data)

typescript
const sdk = new HundredX({ brokerId: 1 });

Full access (trading + deposits)

typescript
const sdk = await HundredX.create({
  privateKey: process.env.PRIVATE_KEY!,
  brokerId: 1,
});

HundredX.create() automatically registers a session key with the backend and configures all authenticated operations.

Available Operations

InitializationAvailable operations
new HundredX({ brokerId })Markets, funding rates, WebSocket streams
HundredX.create({ privateKey, brokerId })+ Orders, positions, deposits, withdrawals, balance queries

Instance Properties

After HundredX.create(), the following properties are available:

PropertyTypeDescription
sdk.ethAddressstringYour ETH address (derived from private key)
sdk.signingAddressstringSigning key public address
sdk.subaccountIdstringSubaccount ID (e.g., "1_0xABC..._1")

With logging

typescript
import { HundredX, LogLevel } from '100x-sdk';

const sdk = new HundredX({
  brokerId: 1,
  logLevel: LogLevel.DEBUG,
});

Log Levels

NODE_ENVDefault Level
developmentDEBUG
productionNONE
testWARN
(not set)INFO

Override with the logLevel config option:

typescript
import { LogLevel } from '100x-sdk';

// Available levels: DEBUG, INFO, WARN, ERROR, NONE

Validation

FieldValidationError
brokerIdMust be providedAuthenticationError
privateKey64 hex characters (with or without 0x prefix)AuthenticationError

Base URL

The SDK connects to https://api.hundred.exchange by default. WebSocket connections are derived automatically (wss://api.hundred.exchange/ws/v1).

100x Exchange Market Maker SDK