CRISP partnersSDK methods

crisp.prepareTrading()

Prepare an account's execution route and active market inputs.

Returns advisory routeReady and warmed booleans; places no order. Run in the background and do not block submission on it.

trading workflow · All SDK methods

Import and runtime

@crisp-trade/partner-sdk — server only; never expose credentials to the browser.

Client setup and shared behavior

Arguments

ArgumentPresenceReleased TypeScript type
userRequired
string
tokenIdsRequired
string[]
optionsOptional
{
        signal?: AbortSignal;
    }

Named types are expanded under “Exact released types” below. Parameters are in call order; optional does not imply nullable.

Example

Example IDs and intent keys are illustrative. Replace them with authenticated account resources and your persisted intent. Browser route names are example routes you implement on your own backend.

// Use a reused, server-only CrispClient (see client setup).
const preparation = await crisp.prepareTrading('user-123', [
  '12345678901234567890',
]);
console.log(preparation.routeReady, preparation.warmed);

Returns

The exact return type is shown below; this helper does not use the ordinary HTTP response wrapper.

Return type
Promise<{
        routeReady: boolean;
        warmed: boolean;
    }>

Errors and lifecycle

Errors and retry policy. Financial uncertainty requires recovery with the original intent, never a new key. Realtime helpers must be stopped on logout/account switch.

Exact released types

Extracted from the shipped SDK 0.13.0, not separately maintained signatures.

Full signature
crisp.prepareTrading(user: string, tokenIds: string[], options?: {
        signal?: AbortSignal;
    }): Promise<{
        routeReady: boolean;
        warmed: boolean;
    }>
CRISP Partner Documentation