@blockworks-foundation/mango-v4
Advanced tools
Comparing version 0.9.12 to 0.9.13
@@ -276,2 +276,4 @@ "use strict"; | ||
//); | ||
// Trigger update funding before cancelling existing orders | ||
instructions.push(await client.perpUpdateFundingIx(group, perpMarket)); | ||
const expiryTimestamp = params.tif !== undefined ? Date.now() / 1000 + params.tif : 0; | ||
@@ -278,0 +280,0 @@ // TODO: oracle pegged runs out of free perp open order slots on mango account |
@@ -8,3 +8,3 @@ { | ||
"perp": { | ||
"sizePerc": 0.75, | ||
"sizePerc": 0.25, | ||
"leanCoeff": 0.00025, | ||
@@ -15,3 +15,3 @@ "bias": 0.0, | ||
"spammerCharge": 2, | ||
"charge": 0.0017, | ||
"charge": 0.002, | ||
"krakenCode": "XXBTZUSD" | ||
@@ -22,3 +22,3 @@ } | ||
"perp": { | ||
"sizePerc": 0.75, | ||
"sizePerc": 0.25, | ||
"leanCoeff": 0.00025, | ||
@@ -29,3 +29,3 @@ "bias": 0.0, | ||
"spammerCharge": 2, | ||
"charge": 0.0017, | ||
"charge": 0.002, | ||
"krakenCode": "SOLUSD" | ||
@@ -36,3 +36,3 @@ } | ||
"perp": { | ||
"sizePerc": 0.75, | ||
"sizePerc": 0.25, | ||
"leanCoeff": 0.00025, | ||
@@ -43,3 +43,3 @@ "bias": 0.0, | ||
"spammerCharge": 2, | ||
"charge": 0.0017, | ||
"charge": 0.002, | ||
"krakenCode": "XETHZUSD" | ||
@@ -46,0 +46,0 @@ } |
@@ -75,2 +75,4 @@ "use strict"; | ||
const serum3Active = this.serum3Active(); | ||
if (!serum3Active.length) | ||
return this; | ||
const ais = await client.program.provider.connection.getMultipleAccountsInfo(serum3Active.map((serum3) => serum3.openOrders)); | ||
@@ -77,0 +79,0 @@ this.serum3OosMapByMarketIndex = new Map(Array.from(ais.map((ai, i) => { |
@@ -130,2 +130,3 @@ /// <reference types="bn.js" /> | ||
perpConsumeAllEvents(group: Group, perpMarketIndex: PerpMarketIndex): Promise<void>; | ||
perpUpdateFundingIx(group: Group, perpMarket: PerpMarket): Promise<TransactionInstruction>; | ||
marginTrade({ group, mangoAccount, inputMintPk, amountIn, outputMintPk, userDefinedInstructions, userDefinedAlts, flashLoanType, }: { | ||
@@ -132,0 +133,0 @@ group: Group; |
@@ -67,3 +67,3 @@ "use strict"; | ||
static async fromApi(groupPk) { | ||
const groupMetadataApiUrl = 'https://mango-transaction-log.herokuapp.com/v4/group-metadata'; | ||
const groupMetadataApiUrl = 'https://api.mngo.cloud/data/v4/group-metadata'; | ||
const response = await (0, cross_fetch_1.default)(groupMetadataApiUrl); | ||
@@ -70,0 +70,0 @@ const jsonData = await response.json(); |
@@ -72,2 +72,4 @@ import { BN } from '@coral-xyz/anchor'; | ||
const serum3Active = this.serum3Active(); | ||
if (!serum3Active.length) | ||
return this; | ||
const ais = await client.program.provider.connection.getMultipleAccountsInfo(serum3Active.map((serum3) => serum3.openOrders)); | ||
@@ -74,0 +76,0 @@ this.serum3OosMapByMarketIndex = new Map(Array.from(ais.map((ai, i) => { |
@@ -61,3 +61,3 @@ import { PublicKey } from '@solana/web3.js'; | ||
static async fromApi(groupPk) { | ||
const groupMetadataApiUrl = 'https://mango-transaction-log.herokuapp.com/v4/group-metadata'; | ||
const groupMetadataApiUrl = 'https://api.mngo.cloud/data/v4/group-metadata'; | ||
const response = await fetch(groupMetadataApiUrl); | ||
@@ -64,0 +64,0 @@ const jsonData = await response.json(); |
@@ -130,2 +130,3 @@ /// <reference types="bn.js" /> | ||
perpConsumeAllEvents(group: Group, perpMarketIndex: PerpMarketIndex): Promise<void>; | ||
perpUpdateFundingIx(group: Group, perpMarket: PerpMarket): Promise<TransactionInstruction>; | ||
marginTrade({ group, mangoAccount, inputMintPk, amountIn, outputMintPk, userDefinedInstructions, userDefinedAlts, flashLoanType, }: { | ||
@@ -132,0 +133,0 @@ group: Group; |
{ | ||
"name": "@blockworks-foundation/mango-v4", | ||
"version": "0.9.12", | ||
"version": "0.9.13", | ||
"description": "Typescript Client for mango-v4 program.", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/blockworks-foundation/mango-v4", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
56796
2793835
254