@bulletxyz/bullet-sdk 0.26.0 → 0.26.1
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 +15 -11
- package/dist/browser/index.js.map +2 -2
- package/dist/node/index.js +15 -11
- package/dist/node/index.js.map +2 -2
- package/dist/types/exchange.d.ts +1 -1
- package/dist/types/zod-types/rest.d.ts +24 -0
- package/package.json +1 -1
package/dist/node/index.js
CHANGED
|
@@ -7696,7 +7696,9 @@ var Schemas = {
|
|
|
7696
7696
|
borrowed_amount: DecimalSchema,
|
|
7697
7697
|
cumulative_deposit_rate: DecimalSchema,
|
|
7698
7698
|
cumulative_borrow_rate: DecimalSchema,
|
|
7699
|
-
accumulated_protocol_fees: DecimalSchema
|
|
7699
|
+
accumulated_protocol_fees: DecimalSchema,
|
|
7700
|
+
unclaimed_protocol_fees: DecimalSchema,
|
|
7701
|
+
interest_fee_tenth_bps: z.number()
|
|
7700
7702
|
})
|
|
7701
7703
|
).nullable(),
|
|
7702
7704
|
PerpPrices: z.object({
|
|
@@ -9542,7 +9544,7 @@ var Client = class _Client {
|
|
|
9542
9544
|
});
|
|
9543
9545
|
}
|
|
9544
9546
|
async amendOrder(options) {
|
|
9545
|
-
const marketId =
|
|
9547
|
+
const marketId = this.exchange.getMarketId(
|
|
9546
9548
|
options.placeOrderArgs.market
|
|
9547
9549
|
);
|
|
9548
9550
|
return await this.submitTransaction({
|
|
@@ -9608,10 +9610,12 @@ var Client = class _Client {
|
|
|
9608
9610
|
return await this.submitTransaction({
|
|
9609
9611
|
exchange: {
|
|
9610
9612
|
cancel_orders: {
|
|
9611
|
-
args: [
|
|
9612
|
-
|
|
9613
|
-
|
|
9614
|
-
|
|
9613
|
+
args: [
|
|
9614
|
+
{
|
|
9615
|
+
order_id: orderId?.toString() ?? null,
|
|
9616
|
+
client_order_id: clientOrderId?.toString() ?? null
|
|
9617
|
+
}
|
|
9618
|
+
]
|
|
9615
9619
|
}
|
|
9616
9620
|
}
|
|
9617
9621
|
});
|
|
@@ -9651,7 +9655,7 @@ var Client = class _Client {
|
|
|
9651
9655
|
update_mark_prices: {
|
|
9652
9656
|
prices_to_update: await Promise.all(
|
|
9653
9657
|
pricesToUpdate.map(async ({ market, medianCexPrice, diffEma }) => ({
|
|
9654
|
-
market_id:
|
|
9658
|
+
market_id: this.exchange.getMarketId(market),
|
|
9655
9659
|
median_cex_price: BulletWasm.convert_rust_decimal_to_json(
|
|
9656
9660
|
medianCexPrice.toFixed()
|
|
9657
9661
|
),
|
|
@@ -9669,7 +9673,7 @@ var Client = class _Client {
|
|
|
9669
9673
|
if (!Number.isInteger(maxLeverage)) {
|
|
9670
9674
|
throw Error("Max leverage must be set to an integer");
|
|
9671
9675
|
}
|
|
9672
|
-
const marketId =
|
|
9676
|
+
const marketId = this.exchange.getMarketId(market);
|
|
9673
9677
|
return await this.submitTransaction({
|
|
9674
9678
|
exchange: {
|
|
9675
9679
|
update_market_max_leverage: {
|
|
@@ -9682,7 +9686,7 @@ var Client = class _Client {
|
|
|
9682
9686
|
async updatePremiumIndexes(markets) {
|
|
9683
9687
|
const marketIds = await Promise.all(
|
|
9684
9688
|
markets.map(async (market) => {
|
|
9685
|
-
return
|
|
9689
|
+
return this.exchange.getMarketId(market);
|
|
9686
9690
|
})
|
|
9687
9691
|
);
|
|
9688
9692
|
return await this.submitTransaction({
|
|
@@ -9702,7 +9706,7 @@ var Client = class _Client {
|
|
|
9702
9706
|
async updateFunding(markets) {
|
|
9703
9707
|
const marketIds = await Promise.all(
|
|
9704
9708
|
markets.map(async (market) => {
|
|
9705
|
-
return
|
|
9709
|
+
return this.exchange.getMarketId(market);
|
|
9706
9710
|
})
|
|
9707
9711
|
);
|
|
9708
9712
|
return await this.submitTransaction({
|
|
@@ -9737,7 +9741,7 @@ var Client = class _Client {
|
|
|
9737
9741
|
async liquidatePerpPositions(address, positions) {
|
|
9738
9742
|
const positionsWithIds = positions ? await Promise.all(
|
|
9739
9743
|
positions.map(async ({ market, size }) => ({
|
|
9740
|
-
market_id:
|
|
9744
|
+
market_id: this.exchange.getMarketId(market),
|
|
9741
9745
|
size: BulletWasm.convert_rust_decimal_to_json(size.toFixed())
|
|
9742
9746
|
}))
|
|
9743
9747
|
) : null;
|