Constants§
- BALANCE_
EPSILON - DEFAULT_
STATIC_ WS_ TOKEN - Default static token from official Indodax Market Data WebSocket documentation. Used for authenticating with the Public Market Data WebSocket (ws3).
- ONE_
DAY_ MS - ONE_
DAY_ SECS - PUBLIC_
WS_ TOKEN_ URL
Functions§
- build_
withdraw_ params - Build withdrawal parameters HashMap shared between CLI and MCP.
- cancel_
all_ open_ orders - Fetch all open orders and cancel them one by one. Returns (cancelled_ids, failed_ids).
- extract_
pairs - fetch_
public_ ws_ token - Fetch a public WebSocket token, with fallback to user configuration and then a hardcoded default.
- first_
of - flatten_
json_ to_ table - format_
balance - Currency-aware balance formatting: 2 decimals for IDR/fiat/stablecoins, 8 for crypto. Handles extreme values gracefully (no scientific notation).
- format_
timestamp - is_
fiat_ or_ stable - Check if a currency is fiat (IDR) or a stablecoin.
- normalize_
pair - normalize_
pair_ v2 - now_
millis - parse_
balance - Parse a balance value for a given currency from API account info response.
- validate_
tick_ size - Validate a price against the price increment (tick size) for a pair. Returns a warning string if validation fails, or None if the price is valid or can’t be checked.
- value_
to_ string