@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.
- package/dist/browser/index.js +27 -30
- package/dist/browser/index.js.map +2 -2
- package/dist/node/index.js +27 -30
- package/dist/node/index.js.map +2 -2
- package/dist/types/client.d.ts +11 -1
- package/package.json +1 -1
package/dist/browser/index.js
CHANGED
|
@@ -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.
|
|
2440
|
-
ws: "wss://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),
|
|
@@ -9313,48 +9310,48 @@ var Client = class _Client {
|
|
|
9313
9310
|
}
|
|
9314
9311
|
});
|
|
9315
9312
|
}
|
|
9316
|
-
async replaceOrder(
|
|
9313
|
+
async replaceOrder(options) {
|
|
9317
9314
|
return await this.submitTransaction({
|
|
9318
9315
|
exchange: {
|
|
9319
9316
|
replace_order: {
|
|
9320
|
-
existing_order_id: existingOrderId
|
|
9321
|
-
existing_client_order_id: existingClientOrderId
|
|
9317
|
+
existing_order_id: options.existingOrderId?.toString() ?? null,
|
|
9318
|
+
existing_client_order_id: options.existingClientOrderId?.toString() ?? null,
|
|
9322
9319
|
order_args: {
|
|
9323
|
-
market_id: placeOrderArgs.marketId,
|
|
9320
|
+
market_id: options.placeOrderArgs.marketId,
|
|
9324
9321
|
price: BulletWasm.convert_rust_decimal_to_json(
|
|
9325
|
-
placeOrderArgs.price.toFixed()
|
|
9322
|
+
options.placeOrderArgs.price.toFixed()
|
|
9326
9323
|
),
|
|
9327
9324
|
size: BulletWasm.convert_rust_decimal_to_json(
|
|
9328
|
-
placeOrderArgs.size.toFixed()
|
|
9325
|
+
options.placeOrderArgs.size.toFixed()
|
|
9329
9326
|
),
|
|
9330
|
-
side: placeOrderArgs.side,
|
|
9331
|
-
order_type: placeOrderArgs.orderType,
|
|
9332
|
-
reduce_only: placeOrderArgs.reduceOnly,
|
|
9333
|
-
client_order_id: placeOrderArgs.clientOrderId ? placeOrderArgs.clientOrderId.toString() : null,
|
|
9334
|
-
tpsl: placeOrderArgs.tpsl ? {
|
|
9335
|
-
pending_tp: placeOrderArgs.tpsl.pendingTp ? {
|
|
9327
|
+
side: options.placeOrderArgs.side,
|
|
9328
|
+
order_type: options.placeOrderArgs.orderType,
|
|
9329
|
+
reduce_only: options.placeOrderArgs.reduceOnly,
|
|
9330
|
+
client_order_id: options.placeOrderArgs.clientOrderId ? options.placeOrderArgs.clientOrderId.toString() : null,
|
|
9331
|
+
tpsl: options.placeOrderArgs.tpsl ? {
|
|
9332
|
+
pending_tp: options.placeOrderArgs.tpsl.pendingTp ? {
|
|
9336
9333
|
order_price: BulletWasm.convert_rust_decimal_to_json(
|
|
9337
|
-
placeOrderArgs.tpsl.pendingTp.orderPrice.toFixed()
|
|
9334
|
+
options.placeOrderArgs.tpsl.pendingTp.orderPrice.toFixed()
|
|
9338
9335
|
),
|
|
9339
9336
|
trigger_price: BulletWasm.convert_rust_decimal_to_json(
|
|
9340
|
-
placeOrderArgs.tpsl.pendingTp.triggerPrice.toFixed()
|
|
9337
|
+
options.placeOrderArgs.tpsl.pendingTp.triggerPrice.toFixed()
|
|
9341
9338
|
),
|
|
9342
|
-
trigger_direction: placeOrderArgs.tpsl.pendingTp.triggerDirection,
|
|
9343
|
-
price_condition: placeOrderArgs.tpsl.pendingTp.priceCondition,
|
|
9344
|
-
order_type: placeOrderArgs.tpsl.pendingTp.orderType
|
|
9339
|
+
trigger_direction: options.placeOrderArgs.tpsl.pendingTp.triggerDirection,
|
|
9340
|
+
price_condition: options.placeOrderArgs.tpsl.pendingTp.priceCondition,
|
|
9341
|
+
order_type: options.placeOrderArgs.tpsl.pendingTp.orderType
|
|
9345
9342
|
} : null,
|
|
9346
|
-
pending_sl: placeOrderArgs.tpsl.pendingSl ? {
|
|
9343
|
+
pending_sl: options.placeOrderArgs.tpsl.pendingSl ? {
|
|
9347
9344
|
order_price: BulletWasm.convert_rust_decimal_to_json(
|
|
9348
|
-
placeOrderArgs.tpsl.pendingSl.orderPrice.toFixed()
|
|
9345
|
+
options.placeOrderArgs.tpsl.pendingSl.orderPrice.toFixed()
|
|
9349
9346
|
),
|
|
9350
9347
|
trigger_price: BulletWasm.convert_rust_decimal_to_json(
|
|
9351
|
-
placeOrderArgs.tpsl.pendingSl.triggerPrice.toFixed()
|
|
9348
|
+
options.placeOrderArgs.tpsl.pendingSl.triggerPrice.toFixed()
|
|
9352
9349
|
),
|
|
9353
|
-
trigger_direction: placeOrderArgs.tpsl.pendingSl.triggerDirection,
|
|
9354
|
-
price_condition: placeOrderArgs.tpsl.pendingSl.priceCondition,
|
|
9355
|
-
order_type: placeOrderArgs.tpsl.pendingSl.orderType
|
|
9350
|
+
trigger_direction: options.placeOrderArgs.tpsl.pendingSl.triggerDirection,
|
|
9351
|
+
price_condition: options.placeOrderArgs.tpsl.pendingSl.priceCondition,
|
|
9352
|
+
order_type: options.placeOrderArgs.tpsl.pendingSl.orderType
|
|
9356
9353
|
} : null,
|
|
9357
|
-
dynamic_size: placeOrderArgs.tpsl.dynamicSize
|
|
9354
|
+
dynamic_size: options.placeOrderArgs.tpsl.dynamicSize
|
|
9358
9355
|
} : null
|
|
9359
9356
|
}
|
|
9360
9357
|
}
|