add unified margin private write tests

This commit is contained in:
tiagosiebler
2022-09-10 19:51:00 +01:00
parent 8d85bcb182
commit d2b41848ec
5 changed files with 136 additions and 31 deletions

View File

@@ -16,6 +16,7 @@ export const API_ERROR_CODE = {
SUCCESS: 0,
/** This could mean bad request, incorrect value types or even incorrect/missing values */
PARAMS_MISSING_OR_WRONG: 10001,
INVALID_API_KEY_OR_PERMISSIONS: 10003,
INCORRECT_API_KEY_PERMISSIONS: 10005,
/** Account not unified margin, update required */
ACCOUNT_NOT_UNIFIED: 10020,

View File

@@ -328,7 +328,10 @@ export class UnifiedMarginClient extends BaseRestClient {
});
}
/** Upgrade to unified margin account */
/**
* Upgrade to unified margin account.
* WARNING: This is currently not reversable!
*/
upgradeToUnifiedMargin(): Promise<APIResponseV3<any>> {
return this.postPrivate(
'/unified/v3/private/account/upgrade-unified-account'