add e2e contract write tests

This commit is contained in:
tiagosiebler
2022-11-12 12:26:09 +00:00
parent 26ef7fd834
commit 7f60027178
3 changed files with 142 additions and 1 deletions

View File

@@ -54,6 +54,12 @@ export const API_ERROR_CODE = {
INSUFFICIENT_BALANCE_FOR_ORDER_COST_LINEAR: 130080,
SAME_SLTP_MODE_LINEAR: 130150,
RISK_ID_NOT_MODIFIED: 134026,
CONTRACT_ORDER_NOT_EXISTS: 140001,
CONTRACT_INSUFFICIENT_BALANCE: 140007,
CONTRACT_POSITION_MODE_NOT_MODIFIED: 140025,
CONTRACT_MARGIN_MODE_NOT_MODIFIED: 140026,
CONTRACT_RISK_LIMIT_INFO_NOT_EXISTS: 140031,
CONTRACT_SET_LEVERAGE_NOT_MODIFIED: 140043,
/** E.g. USDC Options trading, trying to access a symbol that is no longer active */
CONTRACT_NAME_NOT_EXIST: 3100111,
ORDER_NOT_EXIST: 3100136,

View File

@@ -68,7 +68,7 @@ export interface ContractPositionsRequest {
export interface ContractSetAutoAddMarginRequest {
symbol: string;
side: string;
side: 'Buy' | 'Sell';
autoAddMargin: 1 | 0;
positionIdx?: 0 | 1 | 2;
}