mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-10 16:58:08 +00:00
更新文档,添加和修改多个API接口的描述,确保文档内容的准确性和完整性,提升开发者使用体验。
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import { GrvtClient, GrvtWsClient, EGrvtEnvironment } from "@grvt/sdk";
|
||||
|
||||
export interface GrvtCredentials {
|
||||
apiKey: string;
|
||||
apiSecret: string;
|
||||
env: EGrvtEnvironment;
|
||||
subAccountId: string;
|
||||
instrument: string;
|
||||
}
|
||||
|
||||
export class GrvtGateway {
|
||||
private readonly grvtClient: GrvtClient;
|
||||
private readonly wsClient: GrvtWsClient;
|
||||
|
||||
constructor(private readonly credentials: GrvtCredentials) {
|
||||
this.grvtClient = new GrvtClient({
|
||||
apiKey: credentials.apiKey,
|
||||
apiSecret: credentials.apiSecret,
|
||||
env: credentials.env,
|
||||
});
|
||||
this.wsClient = new GrvtWsClient({ apiKey: credentials.apiKey, env: credentials.env });
|
||||
}
|
||||
|
||||
async initialize(): Promise<void> {
|
||||
await this.wsClient.connect();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user