Constructors constructor new Tonic( account: Account , contractId: string ) : Tonic Parameters account: Account contractId: string Properties Readonly accountaccount: Account
Readonly contract Idcontract Id: string
Accessors contract get contract( ) : TonicContract Methods build Swap Params build Swap Params( tokenId: string , amount: BN , swaps: SwapParamsV1 [] ) : FunctionCallOptions Parameters tokenId: string amount: BN swaps: SwapParamsV1 [] Returns FunctionCallOptions cancel All Orders cancel All Orders( market_id: string ) : Promise < { executionOutcome: FinalExecutionOutcome ; response: unknown } > Parameters Returns Promise < { executionOutcome: FinalExecutionOutcome ; response: unknown } > cancel Order cancel Order( market_id: string , order_id: string ) : Promise < { executionOutcome: FinalExecutionOutcome ; response: unknown } > Parameters market_id: string order_id: string Returns Promise < { executionOutcome: FinalExecutionOutcome ; response: unknown } > cancel Orders cancel Orders( marketId: string , orderIds: string [] ) : Promise < { executionOutcome: FinalExecutionOutcome ; response: ActionResultV1 [] } > Parameters marketId: string orderIds: string [] Returns Promise < { executionOutcome: FinalExecutionOutcome ; response: ActionResultV1 [] } > create Market create Market( params: { baseTokenId: string ; baseTokenLotSize: string ; makerRebateBaseRate: number ; quoteTokenId: string ; quoteTokenLotSize: string ; takerFeeBaseRate: number } ) : Promise < { executionOutcome: FinalExecutionOutcome ; response: string } > Parameters params: { baseTokenId: string ; baseTokenLotSize: string ; makerRebateBaseRate: number ; quoteTokenId: string ; quoteTokenLotSize: string ; takerFeeBaseRate: number } base Token Id: string base Token Lot Size: string maker Rebate Base Rate: number quote Token Id: string quote Token Lot Size: string taker Fee Base Rate: number Returns Promise < { executionOutcome: FinalExecutionOutcome ; response: string } > deposit deposit( tokenId: string , amount: BN ) : Promise < { executionOutcome: FinalExecutionOutcome ; response: any } > Parameters tokenId: string amount: BN Returns Promise < { executionOutcome: FinalExecutionOutcome ; response: any } > deposit Ft deposit Ft( tokenId: string , amount: BN , msg: string | { action: "Swap" ; params: SwapParamsV1 [] } ) : Promise < { executionOutcome: FinalExecutionOutcome ; response: any } > Parameters tokenId: string amount: BN msg: string | { action: "Swap" ; params: SwapParamsV1 [] } Returns Promise < { executionOutcome: FinalExecutionOutcome ; response: any } > deposit Near deposit Near( amount: BN ) : Promise < { executionOutcome: FinalExecutionOutcome ; response: any } > Parameters Returns Promise < { executionOutcome: FinalExecutionOutcome ; response: any } > execute Batch execute Batch( batch: PrepareBatch ) : Promise < { executionOutcome: FinalExecutionOutcome ; response: ActionResultV1 [] } > Parameters Returns Promise < { executionOutcome: FinalExecutionOutcome ; response: ActionResultV1 [] } > get Market get Market( marketId: string ) : Promise < Market > Parameters Returns Promise < Market > get Order get Order( market_id: string , order_id: string ) : Promise < null | OpenLimitOrder > Parameters market_id: string order_id: string get Orderbook get Orderbook( market_id: string , depth?: number ) : Promise < Orderbook > Parameters market_id: string depth: number = 12
list Markets list Markets( offset?: number , limit?: number ) : Promise < MarketViewV1 [] > Parameters offset: number = 0 limit: number = 100 Returns Promise < MarketViewV1 [] > place Order place Order( market_id: string , order: NewOrderParamsV1 ) : Promise < { executionOutcome: FinalExecutionOutcome ; response: OrderResultV1 } > Parameters market_id: string order: NewOrderParamsV1 Returns Promise < { executionOutcome: FinalExecutionOutcome ; response: OrderResultV1 } > storage Deposit storage Deposit( params: StorageDepositArgs ) : Promise < { executionOutcome: FinalExecutionOutcome ; result: StorageBalance < BN > } > Parameters params: StorageDepositArgs Returns Promise < { executionOutcome: FinalExecutionOutcome ; result: StorageBalance < BN > } > swap swap( tokenId: string , amount: BN , swaps: SwapParamsV1 [] ) : Promise < { executionOutcome: FinalExecutionOutcome ; response: any } > Parameters tokenId: string amount: BN swaps: SwapParamsV1 [] Returns Promise < { executionOutcome: FinalExecutionOutcome ; response: any } > swap Near swap Near( amount: BN , swaps: SwapParamsV1 [] ) : Promise < { executionOutcome: FinalExecutionOutcome ; response: any } > Parameters amount: BN swaps: SwapParamsV1 [] Returns Promise < { executionOutcome: FinalExecutionOutcome ; response: any } > withdraw withdraw( tokenId: string , amount: BN ) : Promise < { executionOutcome: FinalExecutionOutcome ; response: any } > Parameters tokenId: string amount: BN Returns Promise < { executionOutcome: FinalExecutionOutcome ; response: any } > withdraw Ft withdraw Ft( tokenId: string , amount: BN ) : Promise < { executionOutcome: FinalExecutionOutcome ; response: any } > Parameters tokenId: string amount: BN Returns Promise < { executionOutcome: FinalExecutionOutcome ; response: any } > withdraw Near withdraw Near( amount: BN ) : Promise < { executionOutcome: FinalExecutionOutcome ; response: any } > Parameters Returns Promise < { executionOutcome: FinalExecutionOutcome ; response: any } > Legend Variable Function Type alias Type alias with type parameter Class Constructor Property Method Settings Theme OS Light Dark
Cancel all orders in a market.