ts: perpCancelOrderByClientOrderIdIx
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
This commit is contained in:
parent
0ee9af749f
commit
e730bcd146
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue