import type { ApiIndex, AssetList, CanonicalAsset, CorporateActionList, CorporateActionStatus, CorporateActionType, HealthReport, Portfolio, PriceObservation, Quote, SandboxScenario, SimulateRequest, SimulationResult, TradePlan, TradeRequest } from './types.js'; export type * from './types.js'; export { ROBINHOOD_CHAIN_ID } from './types.js'; /** The API version this SDK release targets. */ export declare const API_VERSION: "v0"; /** Keep in sync with `package.json`; verified by the test suite. */ export declare const SDK_VERSION = "0.6.3"; export interface RailXRequestOptions { /** Cancel this request with an AbortController. */ signal?: AbortSignal; /** Override the client's per-attempt timeout. Set to 0 to disable. */ timeoutMs?: number; } export interface RailXTradePlanOptions extends RailXRequestOptions { /** Reuse this key when retrying the same intent. Generated when omitted. */ idempotencyKey?: string; } export interface RailXClientOptions { /** Base URL including the version segment, e.g. `https://host/api/v0`. */ baseUrl: string; /** Project key beginning with `railx_test_` or `railx_live_`. */ apiKey?: string; fetch?: typeof globalThis.fetch; /** * Force a sandbox scenario on every request. Only valid with test keys; * the API rejects it on live keys. */ scenario?: SandboxScenario; /** * Retries for safe GET requests and idempotent plan creation when they fail * with a retryable error. Other POST requests are never retried. Default 2. */ retries?: number; /** Per-attempt timeout in milliseconds. Set to 0 to disable. Default 30000. */ timeoutMs?: number; } export interface RailXResponseInfo { requestId: string | null; status: number; sandbox: boolean; plan: string | null; environment: 'test' | 'live' | null; rateLimit: { limit: number; remaining: number; resetAt: number; } | null; monthly: { limit: number; remaining: number; } | null; } export declare class RailXApiError extends Error { readonly status: number; readonly code: string; readonly retryable: boolean; readonly details: unknown; readonly requestId: string | null; constructor(options: { status: number; code: string; message: string; retryable?: boolean; details?: unknown; requestId?: string | null; }); } export declare function readResponseInfo(response: Response): RailXResponseInfo; export declare class RailXClient { readonly system: { index: (requestOptions?: RailXRequestOptions) => Promise; health: (requestOptions?: RailXRequestOptions) => Promise; }; readonly assets: { list: (options?: { status?: 'active' | 'inactive' | 'all'; limit?: number; after?: string; }, requestOptions?: RailXRequestOptions) => Promise; get: (symbol: string, requestOptions?: RailXRequestOptions) => Promise; }; readonly prices: { get: (symbol: string, requestOptions?: RailXRequestOptions) => Promise; }; readonly corporateActions: { list: (options?: { symbol?: string; type?: CorporateActionType; status?: CorporateActionStatus; limit?: number; }, requestOptions?: RailXRequestOptions) => Promise; }; readonly portfolios: { get: (wallet: string, options?: { symbols?: string[]; includeZero?: boolean; }, requestOptions?: RailXRequestOptions) => Promise; }; readonly quotes: { create: (request: TradeRequest, options?: RailXRequestOptions) => Promise; }; readonly trades: { plan: (request: TradeRequest, options?: RailXTradePlanOptions) => Promise; get: (planId: string, options?: RailXRequestOptions) => Promise; }; readonly transactions: { simulate: (input: SimulateRequest, options?: RailXRequestOptions) => Promise; }; /** Metadata from the most recent response, including limits and sandbox state. */ lastResponse: RailXResponseInfo | null; private readonly baseUrl; private readonly apiKey?; private readonly scenario?; private readonly retries; private readonly timeoutMs; private readonly requestFetch; constructor(options: RailXClientOptions); private request; } //# sourceMappingURL=index.d.ts.map