Limit Orders
🚧
This page is a work in progress. If you have any questions, please ask in the Discord.
Create Limit Order
Parameters | Type | Required | Description |
---|---|---|---|
offerer | string | Yes | |
chainId | number | No | |
zone | string | No | |
startTime | number | No | Starts 5 minutes in the past by default |
endTime | number | No | Ends 5 minutes in the future by default |
inputToken | string | Yes | |
inputAmount | bigint | Yes | |
inputChainId | number | No | Default chainId of 1 (Ethereum Mainnet) |
inputZone | string | No | |
outputToken | string | Yes | |
outputAmount | bigint | Yes | |
outputChainId | number | No | |
outputZone | number | No | |
counter | number | No | |
toWithdraw | boolean | No |
import { formatIntoLimitOrder } from '@aori-io/sdk';
const formatLimitOrder = await formatIntoLimitOrder({
offerer: "0x..",
startTime: number,
endTime: number,
inputToken: "0x..",
inputAmount: 1000..,
chainId: 1,
zone: "0x..",
inputChainId: 1,
inputZone: "0x..",
outputToken: "0x..",
outputAmount: 100000,
outputChainId: 1,
outputZone: "0x..",
counter: 0,
toWithdraw: boolean
});