@myx-trade/sdk 0.1.190 → 0.1.192

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1824,7 +1824,7 @@ var RotationProvider = class extends import_providers.BaseProvider {
1824
1824
  // package.json
1825
1825
  var package_default = {
1826
1826
  name: "@myx-trade/sdk",
1827
- version: "0.1.190",
1827
+ version: "0.1.192",
1828
1828
  private: false,
1829
1829
  publishConfig: {
1830
1830
  access: "public"
@@ -2089,9 +2089,9 @@ var ExecTypeEnum = /* @__PURE__ */ ((ExecTypeEnum2) => {
2089
2089
  var getHistoryOrders = async ({
2090
2090
  accessToken,
2091
2091
  address,
2092
- isProd = true,
2093
2092
  ...params
2094
- }) => {
2093
+ }, envParams) => {
2094
+ const isProd = envParams?.isProd ?? true;
2095
2095
  return http.get(
2096
2096
  `${getBaseUrlByEnv(isProd)}/openapi/gateway/scan/order/closed`,
2097
2097
  params,
@@ -2119,9 +2119,9 @@ var CloseTypeEnum = /* @__PURE__ */ ((CloseTypeEnum2) => {
2119
2119
  var getPositionHistory = async ({
2120
2120
  accessToken,
2121
2121
  address,
2122
- isProd = true,
2123
2122
  ...params
2124
- }) => {
2123
+ }, envParams) => {
2124
+ const isProd = envParams?.isProd ?? true;
2125
2125
  return http.get(
2126
2126
  `${getBaseUrlByEnv(isProd)}/openapi/gateway/scan/position/closed`,
2127
2127
  params,
@@ -2142,9 +2142,9 @@ var TradeFlowAccountTypeEnum = /* @__PURE__ */ ((TradeFlowAccountTypeEnum2) => {
2142
2142
  var getTradeFlow = async ({
2143
2143
  accessToken,
2144
2144
  address,
2145
- isProd = true,
2146
2145
  ...params
2147
- }) => {
2146
+ }, envParams) => {
2147
+ const isProd = envParams?.isProd ?? true;
2148
2148
  return http.get(
2149
2149
  `${getBaseUrlByEnv(isProd)}/openapi/gateway/scan/trade/flow`,
2150
2150
  params,
@@ -2208,10 +2208,13 @@ var getForwardUrlByEnv = (isProd) => {
2208
2208
  };
2209
2209
  var getOraclePrice = async (chainId, poolIds = [], isProd = true) => {
2210
2210
  if (!!poolIds.length) {
2211
- return http.get(`${getBaseUrlByEnv(isProd)}/openapi/gateway/quote/price/oracles`, {
2212
- chainId,
2213
- poolIds: poolIds.join(",")
2214
- });
2211
+ return http.get(
2212
+ `${getBaseUrlByEnv(isProd)}/openapi/gateway/quote/price/oracles`,
2213
+ {
2214
+ chainId,
2215
+ poolIds: poolIds.join(",")
2216
+ }
2217
+ );
2215
2218
  }
2216
2219
  return Promise.reject(new Error("Invalid pool id"));
2217
2220
  };
@@ -2221,7 +2224,9 @@ var getPoolLevelConfig = async ({
2221
2224
  isProd = true
2222
2225
  }) => {
2223
2226
  return http.get(
2224
- `${getBaseUrlByEnv(isProd)}/openapi/gateway/risk/market_pool/level_config${addQueryParams({
2227
+ `${getBaseUrlByEnv(
2228
+ isProd
2229
+ )}/openapi/gateway/risk/market_pool/level_config${addQueryParams({
2225
2230
  poolId,
2226
2231
  chainId
2227
2232
  })}`
@@ -2229,7 +2234,9 @@ var getPoolLevelConfig = async ({
2229
2234
  };
2230
2235
  var getPoolDetail = async (chainId, poolId, isProd = true) => {
2231
2236
  return await http.get(
2232
- `${getBaseUrlByEnv(isProd)}/openapi/gateway/scan/market/info?chainId=${chainId}&poolId=${poolId}`
2237
+ `${getBaseUrlByEnv(
2238
+ isProd
2239
+ )}/openapi/gateway/scan/market/info?chainId=${chainId}&poolId=${poolId}`
2233
2240
  );
2234
2241
  };
2235
2242
  var getPositions = async (accessToken, address, isProd = true) => {
@@ -2249,24 +2256,30 @@ var getOrders = async (accessToken, address, isProd = true) => {
2249
2256
  return await http.get(
2250
2257
  `${getBaseUrlByEnv(isProd)}/openapi/gateway/scan/order/open`,
2251
2258
  void 0,
2252
- { headers: { myx_openapi_access_token: accessToken, myx_openapi_account: address } }
2259
+ {
2260
+ headers: {
2261
+ myx_openapi_access_token: accessToken,
2262
+ myx_openapi_account: address
2263
+ }
2264
+ }
2253
2265
  );
2254
2266
  };
2255
2267
  var getPoolOpenOrders = async (accessToken, address, chainId, isProd = true) => {
2256
2268
  return await http.get(
2257
- `${getBaseUrlByEnv(isProd)}/openapi/gateway/scan/market/pool-order/open?chainId=${chainId}`,
2269
+ `${getBaseUrlByEnv(
2270
+ isProd
2271
+ )}/openapi/gateway/scan/market/pool-order/open?chainId=${chainId}`,
2258
2272
  void 0,
2259
- { headers: { myx_openapi_access_token: accessToken, myx_openapi_account: address } }
2273
+ {
2274
+ headers: {
2275
+ myx_openapi_access_token: accessToken,
2276
+ myx_openapi_account: address
2277
+ }
2278
+ }
2260
2279
  );
2261
2280
  };
2262
- var getKlineData = ({
2263
- chainId,
2264
- poolId,
2265
- endTime,
2266
- limit,
2267
- interval,
2268
- isProd = true
2269
- }) => {
2281
+ var getKlineData = ({ chainId, poolId, endTime, limit, interval }, envParams) => {
2282
+ const isProd = envParams?.isProd ?? true;
2270
2283
  return http.get(
2271
2284
  `${getBaseUrlByEnv(isProd)}/openapi/gateway/quote/candles`,
2272
2285
  {
@@ -2278,17 +2291,15 @@ var getKlineData = ({
2278
2291
  }
2279
2292
  );
2280
2293
  };
2281
- var getKlineLatestBar = async (params, isProd = true) => {
2294
+ var getKlineLatestBar = async (params, envParams) => {
2295
+ const isProd = envParams?.isProd ?? true;
2282
2296
  return http.get(
2283
2297
  `${getBaseUrlByEnv(isProd)}/openapi/gateway/quote/candle/latest`,
2284
2298
  params
2285
2299
  );
2286
2300
  };
2287
- var getTickerData = async ({
2288
- chainId,
2289
- poolIds,
2290
- isProd = true
2291
- }) => {
2301
+ var getTickerData = async ({ chainId, poolIds }, envParams) => {
2302
+ const isProd = envParams?.isProd ?? true;
2292
2303
  return http.get(
2293
2304
  `${getBaseUrlByEnv(isProd)}/openapi/gateway/quote/candle/tickers`,
2294
2305
  {
@@ -2297,19 +2308,14 @@ var getTickerData = async ({
2297
2308
  }
2298
2309
  );
2299
2310
  };
2300
- var getAllTickers = async ({
2301
- isProd = true
2302
- }) => {
2311
+ var getAllTickers = async (envParams) => {
2312
+ const isProd = envParams?.isProd ?? true;
2303
2313
  return http.get(
2304
2314
  `${getBaseUrlByEnv(isProd)}/v2/mx-gateway/quote/candle/all_tickers`
2305
2315
  );
2306
2316
  };
2307
- var searchMarketAuth = async ({
2308
- accessToken,
2309
- address,
2310
- isProd = true,
2311
- ...params
2312
- }) => {
2317
+ var searchMarketAuth = async ({ accessToken, address, ...params }, envParams) => {
2318
+ const isProd = envParams?.isProd ?? true;
2313
2319
  return http.get(
2314
2320
  `${getBaseUrlByEnv(isProd)}/openapi/gateway/scan/market/ac-search`,
2315
2321
  params,
@@ -2321,21 +2327,15 @@ var searchMarketAuth = async ({
2321
2327
  }
2322
2328
  );
2323
2329
  };
2324
- var searchMarket = async ({
2325
- isProd = true,
2326
- ...params
2327
- }) => {
2330
+ var searchMarket = async ({ ...params }, envParams) => {
2331
+ const isProd = envParams?.isProd ?? true;
2328
2332
  return http.get(
2329
2333
  `${getBaseUrlByEnv(isProd)}/openapi/gateway/scan/market/search`,
2330
2334
  params
2331
2335
  );
2332
2336
  };
2333
- var addFavorite = async ({
2334
- accessToken,
2335
- address,
2336
- isProd = true,
2337
- ...params
2338
- }) => {
2337
+ var addFavorite = async ({ accessToken, address, ...params }, envParams) => {
2338
+ const isProd = envParams?.isProd ?? true;
2339
2339
  return http.get(
2340
2340
  `${getBaseUrlByEnv(isProd)}/openapi/gateway/scan/market/add-favorites`,
2341
2341
  params,
@@ -2350,9 +2350,9 @@ var addFavorite = async ({
2350
2350
  var removeFavorite = async ({
2351
2351
  accessToken,
2352
2352
  address,
2353
- isProd = true,
2354
2353
  ...params
2355
- }) => {
2354
+ }, envParams) => {
2355
+ const isProd = envParams?.isProd ?? true;
2356
2356
  return http.get(
2357
2357
  `${getBaseUrlByEnv(isProd)}/openapi/gateway/scan/market/cancel-favorites`,
2358
2358
  params,
@@ -2364,12 +2364,8 @@ var removeFavorite = async ({
2364
2364
  }
2365
2365
  );
2366
2366
  };
2367
- var getFavoritesList = async ({
2368
- accessToken,
2369
- address,
2370
- isProd = true,
2371
- ...params
2372
- }) => {
2367
+ var getFavoritesList = async ({ accessToken, address, ...params }, envParams) => {
2368
+ const isProd = envParams?.isProd ?? true;
2373
2369
  return http.get(
2374
2370
  `${getBaseUrlByEnv(isProd)}/openapi/gateway/scan/market/favorites`,
2375
2371
  params,
@@ -2381,28 +2377,25 @@ var getFavoritesList = async ({
2381
2377
  }
2382
2378
  );
2383
2379
  };
2384
- var getBaseDetail = async ({
2385
- isProd = true,
2386
- ...params
2387
- }) => {
2380
+ var getBaseDetail = async ({ ...params }, envParams) => {
2381
+ const isProd = envParams?.isProd ?? true;
2388
2382
  return http.get(
2389
2383
  `${getBaseUrlByEnv(isProd)}/openapi/gateway/scan/market/base-details`,
2390
2384
  params
2391
2385
  );
2392
2386
  };
2393
- var getMarketDetail = async ({
2394
- isProd = true,
2395
- ...params
2396
- }) => {
2387
+ var getMarketDetail = async ({ ...params }, envParams) => {
2388
+ const isProd = envParams?.isProd ?? true;
2397
2389
  return http.get(
2398
2390
  `${getBaseUrlByEnv(isProd)}/openapi/gateway/scan/market/detail`,
2399
2391
  params
2400
2392
  );
2401
2393
  };
2402
- var getMarketList = async ({
2403
- isProd = true
2404
- }) => {
2405
- return http.get(`${getBaseUrlByEnv(isProd)}/openapi/gateway/scan/market`);
2394
+ var getMarketList = async (envParams) => {
2395
+ const isProd = envParams?.isProd ?? true;
2396
+ return http.get(
2397
+ `${getBaseUrlByEnv(isProd)}/openapi/gateway/scan/market`
2398
+ );
2406
2399
  };
2407
2400
 
2408
2401
  // src/web3/index.ts
@@ -2458,7 +2451,9 @@ var MxSDK = class _MxSDK {
2458
2451
  }
2459
2452
  async getMarkets() {
2460
2453
  try {
2461
- const result = await getMarketList();
2454
+ const result = await getMarketList({
2455
+ isProd: !this.configManager?.getConfig()?.isTestnet
2456
+ });
2462
2457
  this.Markets = result?.data || [];
2463
2458
  } catch (error) {
2464
2459
  throw error;
@@ -14244,19 +14239,31 @@ var Markets = class {
14244
14239
  interval,
14245
14240
  ...params
14246
14241
  }) {
14247
- return (await getKlineData({
14248
- ...params,
14249
- interval: this.utils.transferKlineResolutionToInterval(interval)
14250
- })).data;
14242
+ const config = this.configManager.getConfig();
14243
+ return (await getKlineData(
14244
+ {
14245
+ ...params,
14246
+ interval: this.utils.transferKlineResolutionToInterval(interval)
14247
+ },
14248
+ {
14249
+ isProd: !config?.isTestnet
14250
+ }
14251
+ )).data;
14251
14252
  }
14252
14253
  async getKlineLatestBar({
14253
14254
  interval,
14254
14255
  ...params
14255
14256
  }) {
14256
- return (await getKlineLatestBar({
14257
- ...params,
14258
- interval: this.utils.transferKlineResolutionToInterval(interval)
14259
- })).data;
14257
+ const config = this.configManager.getConfig();
14258
+ return (await getKlineLatestBar(
14259
+ {
14260
+ ...params,
14261
+ interval: this.utils.transferKlineResolutionToInterval(interval)
14262
+ },
14263
+ {
14264
+ isProd: !config?.isTestnet
14265
+ }
14266
+ )).data;
14260
14267
  }
14261
14268
  /**
14262
14269
  * kline end
@@ -14265,7 +14272,10 @@ var Markets = class {
14265
14272
  * ticker start
14266
14273
  */
14267
14274
  async getTickerList(params) {
14268
- return (await getTickerData(params)).data;
14275
+ const config = this.configManager.getConfig();
14276
+ return (await getTickerData(params, {
14277
+ isProd: !config?.isTestnet
14278
+ })).data;
14269
14279
  }
14270
14280
  /**
14271
14281
  * ticker end
@@ -14276,6 +14286,7 @@ var Markets = class {
14276
14286
  *
14277
14287
  */
14278
14288
  async searchMarketAuth(params, address) {
14289
+ const config = this.configManager.getConfig();
14279
14290
  const accessToken = await this.configManager.getAccessToken();
14280
14291
  if (!accessToken) {
14281
14292
  throw new MyxSDKError(
@@ -14283,23 +14294,32 @@ var Markets = class {
14283
14294
  "Invalid access token"
14284
14295
  );
14285
14296
  }
14286
- return (await searchMarketAuth({
14287
- address,
14288
- ...params,
14289
- accessToken
14290
- })).data;
14297
+ return (await searchMarketAuth(
14298
+ {
14299
+ address,
14300
+ ...params,
14301
+ accessToken
14302
+ },
14303
+ {
14304
+ isProd: !config?.isTestnet
14305
+ }
14306
+ )).data;
14291
14307
  }
14292
14308
  /**
14293
14309
  * search by unauthenticated users
14294
14310
  */
14295
14311
  async searchMarket(params) {
14296
- return (await searchMarket(params)).data;
14312
+ const config = this.configManager.getConfig();
14313
+ return (await searchMarket(params, {
14314
+ isProd: !config?.isTestnet
14315
+ })).data;
14297
14316
  }
14298
14317
  /**
14299
14318
  * get favorites list
14300
14319
  * (only for authenticated users)
14301
14320
  */
14302
14321
  async getFavoritesList(params, address) {
14322
+ const config = this.configManager.getConfig();
14303
14323
  const accessToken = await this.configManager.getAccessToken();
14304
14324
  if (!accessToken) {
14305
14325
  throw new MyxSDKError(
@@ -14307,16 +14327,22 @@ var Markets = class {
14307
14327
  "Invalid access token"
14308
14328
  );
14309
14329
  }
14310
- return (await getFavoritesList({
14311
- ...params,
14312
- address,
14313
- accessToken
14314
- })).data;
14330
+ return (await getFavoritesList(
14331
+ {
14332
+ ...params,
14333
+ address,
14334
+ accessToken
14335
+ },
14336
+ {
14337
+ isProd: !config?.isTestnet
14338
+ }
14339
+ )).data;
14315
14340
  }
14316
14341
  /**
14317
14342
  * favorite
14318
14343
  */
14319
14344
  async addFavorite(params, address) {
14345
+ const config = this.configManager.getConfig();
14320
14346
  const accessToken = await this.configManager.getAccessToken();
14321
14347
  if (!accessToken) {
14322
14348
  throw new MyxSDKError(
@@ -14324,13 +14350,19 @@ var Markets = class {
14324
14350
  "Invalid access token"
14325
14351
  );
14326
14352
  }
14327
- return (await addFavorite({
14328
- ...params,
14329
- address,
14330
- accessToken
14331
- })).data;
14353
+ return (await addFavorite(
14354
+ {
14355
+ ...params,
14356
+ address,
14357
+ accessToken
14358
+ },
14359
+ {
14360
+ isProd: !config?.isTestnet
14361
+ }
14362
+ )).data;
14332
14363
  }
14333
14364
  async removeFavorite(params, address) {
14365
+ const config = this.configManager.getConfig();
14334
14366
  const accessToken = await this.configManager.getAccessToken();
14335
14367
  if (!accessToken) {
14336
14368
  throw new MyxSDKError(
@@ -14338,29 +14370,43 @@ var Markets = class {
14338
14370
  "Invalid access token"
14339
14371
  );
14340
14372
  }
14341
- return (await removeFavorite({
14342
- ...params,
14343
- address,
14344
- accessToken
14345
- })).data;
14373
+ return (await removeFavorite(
14374
+ {
14375
+ ...params,
14376
+ address,
14377
+ accessToken
14378
+ },
14379
+ {
14380
+ isProd: !config?.isTestnet
14381
+ }
14382
+ )).data;
14346
14383
  }
14347
14384
  /**
14348
14385
  * base detail
14349
14386
  */
14350
14387
  async getBaseDetail(params) {
14351
- return (await getBaseDetail(params)).data;
14388
+ const config = this.configManager.getConfig();
14389
+ return (await getBaseDetail(params, {
14390
+ isProd: !config?.isTestnet
14391
+ })).data;
14352
14392
  }
14353
14393
  /**
14354
14394
  * get market detail
14355
14395
  */
14356
14396
  async getMarketDetail(params) {
14357
- return (await getMarketDetail(params)).data;
14397
+ const config = this.configManager.getConfig();
14398
+ return (await getMarketDetail(params, {
14399
+ isProd: !config?.isTestnet
14400
+ })).data;
14358
14401
  }
14359
14402
  /**
14360
14403
  * get pool symbol all
14361
14404
  */
14362
14405
  async getPoolSymbolAll() {
14363
- return (await getPoolSymbolAll()).data;
14406
+ const config = this.configManager.getConfig();
14407
+ return (await getPoolSymbolAll({
14408
+ isProd: !config?.isTestnet
14409
+ })).data;
14364
14410
  }
14365
14411
  };
14366
14412
 
@@ -14399,7 +14445,7 @@ var Position = class {
14399
14445
  }
14400
14446
  }
14401
14447
  async getPositionHistory(params, address) {
14402
- const isProd = !this.configManager.getConfig().isTestnet;
14448
+ const config = this.configManager.getConfig();
14403
14449
  const accessToken = await this.configManager.getAccessToken();
14404
14450
  if (!accessToken) {
14405
14451
  throw new MyxSDKError(
@@ -14407,7 +14453,12 @@ var Position = class {
14407
14453
  "Invalid access token"
14408
14454
  );
14409
14455
  }
14410
- const res = await getPositionHistory({ accessToken, ...params, address, isProd });
14456
+ const res = await getPositionHistory(
14457
+ { accessToken, ...params, address },
14458
+ {
14459
+ isProd: !config?.isTestnet
14460
+ }
14461
+ );
14411
14462
  return {
14412
14463
  code: 0,
14413
14464
  data: res.data
@@ -14453,7 +14504,11 @@ var Position = class {
14453
14504
  const seamlessWallet = this.configManager.getConfig().seamlessAccount?.wallet;
14454
14505
  let depositAmount = BigInt(0);
14455
14506
  const used = BigInt(adjustAmount) > 0 ? BigInt(adjustAmount) : 0n;
14456
- const availableAccountMarginBalance = await this.account.getAvailableMarginBalance({ poolId, chainId, address });
14507
+ const availableAccountMarginBalance = await this.account.getAvailableMarginBalance({
14508
+ poolId,
14509
+ chainId,
14510
+ address
14511
+ });
14457
14512
  let diff = BigInt(0);
14458
14513
  if (availableAccountMarginBalance < used) {
14459
14514
  diff = used - availableAccountMarginBalance;
@@ -14475,21 +14530,24 @@ var Position = class {
14475
14530
  throw new Error(approvalResult.message);
14476
14531
  }
14477
14532
  }
14478
- const isEnoughGas = await this.utils.checkSeamlessGas(config.seamlessAccount?.masterAddress);
14533
+ const isEnoughGas = await this.utils.checkSeamlessGas(
14534
+ config.seamlessAccount?.masterAddress
14535
+ );
14479
14536
  if (!isEnoughGas) {
14480
- throw new MyxSDKError("INSUFFICIENT_BALANCE" /* InsufficientBalance */, "Insufficient relay fee");
14537
+ throw new MyxSDKError(
14538
+ "INSUFFICIENT_BALANCE" /* InsufficientBalance */,
14539
+ "Insufficient relay fee"
14540
+ );
14481
14541
  }
14482
14542
  const forwarderContract = await getForwarderContract(chainId);
14483
14543
  const brokerContract2 = await getSeamlessBrokerContract(
14484
14544
  this.configManager.getConfig().brokerAddress,
14485
14545
  seamlessWallet
14486
14546
  );
14487
- const functionHash = brokerContract2.interface.encodeFunctionData("updatePriceAndAdjustCollateral", [
14488
- [updateParams],
14489
- depositData,
14490
- positionId,
14491
- adjustAmount
14492
- ]);
14547
+ const functionHash = brokerContract2.interface.encodeFunctionData(
14548
+ "updatePriceAndAdjustCollateral",
14549
+ [[updateParams], depositData, positionId, adjustAmount]
14550
+ );
14493
14551
  const nonce = await forwarderContract.nonces(seamlessWallet.address);
14494
14552
  const forwardTxParams = {
14495
14553
  from: seamlessWallet.address ?? "",
@@ -14500,8 +14558,15 @@ var Position = class {
14500
14558
  data: functionHash,
14501
14559
  nonce: nonce.toString()
14502
14560
  };
14503
- this.logger.info("adjust collateral forward tx params --->", forwardTxParams);
14504
- const rs = await this.seamless.forwarderTx(forwardTxParams, chainId, seamlessWallet);
14561
+ this.logger.info(
14562
+ "adjust collateral forward tx params --->",
14563
+ forwardTxParams
14564
+ );
14565
+ const rs = await this.seamless.forwarderTx(
14566
+ forwardTxParams,
14567
+ chainId,
14568
+ seamlessWallet
14569
+ );
14505
14570
  console.log("rs-->", rs);
14506
14571
  return {
14507
14572
  code: 0,
@@ -15620,15 +15685,17 @@ var Order = class {
15620
15685
  }
15621
15686
  }
15622
15687
  async getOrderHistory(params, address) {
15688
+ const config = this.configManager.getConfig();
15623
15689
  const accessToken = await this.configManager.getAccessToken();
15624
- const isProd = !this.configManager.getConfig().isTestnet;
15625
15690
  if (!accessToken) {
15626
15691
  throw new MyxSDKError(
15627
15692
  "INVALID_ACCESS_TOKEN" /* InvalidAccessToken */,
15628
15693
  "Invalid access token"
15629
15694
  );
15630
15695
  }
15631
- const res = await getHistoryOrders({ accessToken, ...params, address, isProd });
15696
+ const res = await getHistoryOrders({ accessToken, ...params, address }, {
15697
+ isProd: !config?.isTestnet
15698
+ });
15632
15699
  return {
15633
15700
  code: 0,
15634
15701
  data: res.data
@@ -21422,7 +21489,7 @@ var Account = class {
21422
21489
  }
21423
21490
  }
21424
21491
  async getTradeFlow(params, address) {
21425
- const isProd = !this.configManager.getConfig().isTestnet;
21492
+ const config = this.configManager.getConfig();
21426
21493
  const accessToken = await this.configManager.getAccessToken();
21427
21494
  if (!accessToken) {
21428
21495
  throw new MyxSDKError(
@@ -21430,7 +21497,9 @@ var Account = class {
21430
21497
  "Invalid access token"
21431
21498
  );
21432
21499
  }
21433
- const res = await getTradeFlow({ accessToken, ...params, address, isProd });
21500
+ const res = await getTradeFlow({ accessToken, ...params, address }, {
21501
+ isProd: !config?.isTestnet
21502
+ });
21434
21503
  return {
21435
21504
  code: 0,
21436
21505
  data: res.data