fixes for private spot GET calls, improve signing process, add private read tests for spot & linear

This commit is contained in:
tiagosiebler
2022-05-08 01:00:12 +01:00
parent 7840829454
commit 38f5a6286c
9 changed files with 176 additions and 41 deletions

View File

@@ -76,7 +76,7 @@ export function isPublicEndpoint(endpoint: string): boolean {
}
export function isWsPong(response: any) {
if (response.pong) {
if (response.pong || response.ping) {
return true;
}
return (
@@ -86,3 +86,13 @@ export function isWsPong(response: any) {
response.success === true
);
}
export const REST_CLIENT_TYPE_ENUM = {
inverse: 'inverse',
inverseFutures: 'inverseFutures',
linear: 'linear',
spot: 'spot',
} as const;
export type RestClientType =
typeof REST_CLIENT_TYPE_ENUM[keyof typeof REST_CLIENT_TYPE_ENUM];