ts: perpCancelOrderByClientOrderIdIx

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
This commit is contained in:
microwavedcola1 2023-08-30 07:21:03 +02:00
parent 0ee9af749f
commit e730bcd146
1 changed files with 20 additions and 0 deletions

View File

@ -2746,6 +2746,26 @@ export class MangoClient {
.instruction();
}
public async perpCancelOrderByClientOrderIdIx(
group: Group,
mangoAccount: MangoAccount,
perpMarketIndex: PerpMarketIndex,
clientOrderId: BN,
): Promise<TransactionInstruction> {
const perpMarket = group.getPerpMarketByMarketIndex(perpMarketIndex);
return await this.program.methods
.perpCancelOrderByClientOrderId(new BN(clientOrderId))
.accounts({
group: group.publicKey,
account: mangoAccount.publicKey,
owner: (this.program.provider as AnchorProvider).wallet.publicKey,
perpMarket: perpMarket.publicKey,
bids: perpMarket.bids,
asks: perpMarket.asks,
})
.instruction();
}
public async perpCancelOrderIx(
group: Group,
mangoAccount: MangoAccount,