@bulletxyz/bullet-sdk 0.25.0-rc.10 → 0.25.0-rc.11

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.
@@ -2436,8 +2436,8 @@ var NETWORKS = {
2436
2436
  ws: "ws://127.0.0.1:3000/ws"
2437
2437
  },
2438
2438
  Staging: {
2439
- rest: "https://rollup.stg.bullet.xyz",
2440
- ws: "wss://ws.stg.bullet.xyz/ws"
2439
+ rest: "https://rollup.staging.bullet.xyz",
2440
+ ws: "wss://ws.staging.bullet.xyz/ws"
2441
2441
  },
2442
2442
  Testnet: {
2443
2443
  rest: "https://rollup.testnet.bullet.xyz",
@@ -6901,10 +6901,7 @@ var Schemas = {
6901
6901
  )
6902
6902
  })
6903
6903
  ),
6904
- borrow_lend_risk_configs: createJsonMap(
6905
- AssetId,
6906
- BorrowLendRiskConfig
6907
- )
6904
+ borrow_lend_risk_configs: createJsonMap(AssetId, BorrowLendRiskConfig)
6908
6905
  }),
6909
6906
  AccountAddresses: z.object({
6910
6907
  addresses: z.array(Base58Address),
@@ -9327,48 +9324,48 @@ var Client = class _Client {
9327
9324
  }
9328
9325
  });
9329
9326
  }
9330
- async replaceOrder(existingOrderId, existingClientOrderId, placeOrderArgs) {
9327
+ async replaceOrder(options) {
9331
9328
  return await this.submitTransaction({
9332
9329
  exchange: {
9333
9330
  replace_order: {
9334
- existing_order_id: existingOrderId ? existingOrderId.toString() : null,
9335
- existing_client_order_id: existingClientOrderId ? existingClientOrderId.toString() : null,
9331
+ existing_order_id: options.existingOrderId?.toString() ?? null,
9332
+ existing_client_order_id: options.existingClientOrderId?.toString() ?? null,
9336
9333
  order_args: {
9337
- market_id: placeOrderArgs.marketId,
9334
+ market_id: options.placeOrderArgs.marketId,
9338
9335
  price: BulletWasm.convert_rust_decimal_to_json(
9339
- placeOrderArgs.price.toFixed()
9336
+ options.placeOrderArgs.price.toFixed()
9340
9337
  ),
9341
9338
  size: BulletWasm.convert_rust_decimal_to_json(
9342
- placeOrderArgs.size.toFixed()
9339
+ options.placeOrderArgs.size.toFixed()
9343
9340
  ),
9344
- side: placeOrderArgs.side,
9345
- order_type: placeOrderArgs.orderType,
9346
- reduce_only: placeOrderArgs.reduceOnly,
9347
- client_order_id: placeOrderArgs.clientOrderId ? placeOrderArgs.clientOrderId.toString() : null,
9348
- tpsl: placeOrderArgs.tpsl ? {
9349
- pending_tp: placeOrderArgs.tpsl.pendingTp ? {
9341
+ side: options.placeOrderArgs.side,
9342
+ order_type: options.placeOrderArgs.orderType,
9343
+ reduce_only: options.placeOrderArgs.reduceOnly,
9344
+ client_order_id: options.placeOrderArgs.clientOrderId ? options.placeOrderArgs.clientOrderId.toString() : null,
9345
+ tpsl: options.placeOrderArgs.tpsl ? {
9346
+ pending_tp: options.placeOrderArgs.tpsl.pendingTp ? {
9350
9347
  order_price: BulletWasm.convert_rust_decimal_to_json(
9351
- placeOrderArgs.tpsl.pendingTp.orderPrice.toFixed()
9348
+ options.placeOrderArgs.tpsl.pendingTp.orderPrice.toFixed()
9352
9349
  ),
9353
9350
  trigger_price: BulletWasm.convert_rust_decimal_to_json(
9354
- placeOrderArgs.tpsl.pendingTp.triggerPrice.toFixed()
9351
+ options.placeOrderArgs.tpsl.pendingTp.triggerPrice.toFixed()
9355
9352
  ),
9356
- trigger_direction: placeOrderArgs.tpsl.pendingTp.triggerDirection,
9357
- price_condition: placeOrderArgs.tpsl.pendingTp.priceCondition,
9358
- order_type: placeOrderArgs.tpsl.pendingTp.orderType
9353
+ trigger_direction: options.placeOrderArgs.tpsl.pendingTp.triggerDirection,
9354
+ price_condition: options.placeOrderArgs.tpsl.pendingTp.priceCondition,
9355
+ order_type: options.placeOrderArgs.tpsl.pendingTp.orderType
9359
9356
  } : null,
9360
- pending_sl: placeOrderArgs.tpsl.pendingSl ? {
9357
+ pending_sl: options.placeOrderArgs.tpsl.pendingSl ? {
9361
9358
  order_price: BulletWasm.convert_rust_decimal_to_json(
9362
- placeOrderArgs.tpsl.pendingSl.orderPrice.toFixed()
9359
+ options.placeOrderArgs.tpsl.pendingSl.orderPrice.toFixed()
9363
9360
  ),
9364
9361
  trigger_price: BulletWasm.convert_rust_decimal_to_json(
9365
- placeOrderArgs.tpsl.pendingSl.triggerPrice.toFixed()
9362
+ options.placeOrderArgs.tpsl.pendingSl.triggerPrice.toFixed()
9366
9363
  ),
9367
- trigger_direction: placeOrderArgs.tpsl.pendingSl.triggerDirection,
9368
- price_condition: placeOrderArgs.tpsl.pendingSl.priceCondition,
9369
- order_type: placeOrderArgs.tpsl.pendingSl.orderType
9364
+ trigger_direction: options.placeOrderArgs.tpsl.pendingSl.triggerDirection,
9365
+ price_condition: options.placeOrderArgs.tpsl.pendingSl.priceCondition,
9366
+ order_type: options.placeOrderArgs.tpsl.pendingSl.orderType
9370
9367
  } : null,
9371
- dynamic_size: placeOrderArgs.tpsl.dynamicSize
9368
+ dynamic_size: options.placeOrderArgs.tpsl.dynamicSize
9372
9369
  } : null
9373
9370
  }
9374
9371
  }