add coverage for inverse futures private getter endpoints, migrate private getter methods to base class

This commit is contained in:
tiagosiebler
2022-05-06 22:06:32 +01:00
parent 749efad303
commit d11fbfa227
5 changed files with 164 additions and 57 deletions

View File

@@ -59,11 +59,18 @@ export function getRestBaseUrl(
}
export function isPublicEndpoint(endpoint: string): boolean {
if (endpoint.startsWith('v2/public')) {
return true;
}
if (endpoint.startsWith('public/linear')) {
return true;
const publicPrefixes = [
'v2/public',
'public/linear',
'spot/quote/v1',
'spot/v1/symbols',
'spot/v1/time',
];
for (const prefix of publicPrefixes) {
if (endpoint.startsWith(prefix)) {
return true;
}
}
return false;
}