UNPKG

okex-api

Version:

A modern, asynchronous, and easy-to-use [Okx API](https://www.okx.com/docs-v5) wrapper for Node.js/bun/Web Browser/Cloudflare workers.

27 lines (26 loc) 984 B
declare class Signer { private cryptoKey; private unixTime; constructor(cryptoKey: CryptoKey, unixTime?: boolean); sign(path: string, params?: string, method?: 'GET' | 'POST'): Promise<{ timestamp: string | number; sign: string; }>; static create(secret: string, unixTime?: boolean): Promise<Signer>; } export declare class APICredentials { private apiKey; private signer; private passphrase; constructor(apiKey: string, signer: Signer, passphrase: string); getHttpHeaders(method: 'GET' | 'POST', path: string, params?: string): Promise<{ 'Content-Type'?: string | undefined; 'OK-ACCESS-KEY': string; 'OK-ACCESS-TIMESTAMP': string; 'OK-ACCESS-SIGN': string; 'OK-ACCESS-PASSPHRASE': string; }>; getWsLoginMessage(): Promise<string>; static create(apiKey: string, apiSecret: string, passphrase: string, unixTime?: boolean): Promise<APICredentials | undefined>; } export {};