GMX v2 - Trading (#7)
* Move PrivateKeys.cs * Update gitignore * Update gitignore * updt * Extract GmxServiceTests.cs * Refact * update todo * Update code * Fix hashdata * Replace static token hashed datas * Set allowance * Add get orders * Add get orders tests * Add ignore * add close orders * revert * Add get gas limit * Start increasePosition. Todo: Finish GetExecutionFee and estimateGas * little refact * Update gitignore * Fix namespaces and clean repo * Add tests samples * Add execution fee * Add increase position * Handle backtest on the frontend * Add tests * Update increase * Test increase * fix increase * Fix size * Start get position * Update get positions * Fix get position * Update rpc and trade mappers * Finish close position * Fix leverage
This commit is contained in:
@@ -44,9 +44,22 @@
|
||||
public const string POOL_AMOUNT_KEY = "POOL_AMOUNT";
|
||||
public const string MARKET_DISABLED_KEY = "IS_MARKET_DISABLED";
|
||||
public const string MAX_PNL_FACTOR_FOR_TRADERS = "MAX_PNL_FACTOR_FOR_TRADERS";
|
||||
public const string ACCOUNT_ORDER_LIST_KEY = "ACCOUNT_ORDER_LIST";
|
||||
public const string DEPOSIT_GAS_LIMIT_KEY = "DEPOSIT_GAS_LIMIT";
|
||||
public const string WITHDRAWAL_GAS_LIMIT_KEY = "WITHDRAWAL_GAS_LIMIT";
|
||||
public const string SHIFT_GAS_LIMIT_KEY = "SHIFT_GAS_LIMIT";
|
||||
public const string SINGLE_SWAP_GAS_LIMIT_KEY = "SINGLE_SWAP_GAS_LIMIT";
|
||||
public const string SWAP_ORDER_GAS_LIMIT_KEY = "SWAP_ORDER_GAS_LIMIT";
|
||||
public const string INCREASE_ORDER_GAS_LIMIT_KEY = "INCREASE_ORDER_GAS_LIMIT";
|
||||
public const string DECREASE_ORDER_GAS_LIMIT_KEY = "DECREASE_ORDER_GAS_LIMIT";
|
||||
public const string ESTIMATED_GAS_FEE_BASE_AMOUNT = "ESTIMATED_GAS_FEE_BASE_AMOUNT_V2_1";
|
||||
public const string ESTIMATED_GAS_FEE_PER_ORACLE_PRICE = "ESTIMATED_GAS_FEE_PER_ORACLE_PRICE";
|
||||
public const string ESTIMATED_GAS_FEE_MULTIPLIER_FACTOR = "ESTIMATED_GAS_FEE_MULTIPLIER_FACTOR";
|
||||
|
||||
public class Config
|
||||
{
|
||||
public const string OracleKeeperUrl = "https://arbitrum-v2-1-api.gmxinfra.io";
|
||||
|
||||
public static readonly HashSet<Enums.Ticker> DeltaNeutralTickers = new()
|
||||
{
|
||||
Enums.Ticker.BTC,
|
||||
@@ -61,6 +74,11 @@
|
||||
Enums.Ticker.PEPE,
|
||||
Enums.Ticker.WIF,
|
||||
};
|
||||
|
||||
public static class Decimals
|
||||
{
|
||||
public const int USD = 30;
|
||||
}
|
||||
}
|
||||
|
||||
public class TokenAddress
|
||||
|
||||
@@ -7,7 +7,8 @@ public static class Enums
|
||||
Binance,
|
||||
Kraken,
|
||||
Ftx,
|
||||
Evm
|
||||
Evm,
|
||||
GmxV2
|
||||
}
|
||||
|
||||
public enum GmxOrderType
|
||||
|
||||
Reference in New Issue
Block a user