client-aftermath-ts-sdk
Version:
Client Aftermath TypeScript SDK
69 lines • 2.08 kB
TypeScript
import { ObjectId, SuiAddress } from "../../types";
import { CoinType } from "../coin/coinTypes";
import { Balance, Timestamp, TransactionDigest } from "../../general/types/generalTypes";
export interface LimitOrdersIntegratorFeeData {
feeBps: number;
feeRecipient: SuiAddress;
}
export interface ApiLimitOrdersCreateOrderTransactionBody {
walletAddress: SuiAddress;
allocateCoinType: CoinType;
allocateCoinAmount: Balance;
buyCoinType: CoinType;
customRecipient?: SuiAddress;
expiryDurationMs: number;
isSponsoredTx?: boolean;
integratorFee?: LimitOrdersIntegratorFeeData;
outputToInputExchangeRate: number;
outputToInputStopLossExchangeRate?: number;
}
export interface ApiLimitOrdersSubOrdersBody {
orderPrice: Balance;
ordersAmount: number;
}
export interface ApiLimitLaddersOrdersBody {
price: Balance;
quantity: Balance;
}
export interface ApiLimitOrdersCancelOrderTransactionBody {
walletAddress: SuiAddress;
bytes: string;
signature: string;
}
export type LimitOrdersOrderStatus = "Active" | "Canceled" | "Failed" | "Filled" | "Expired" | "StopLossTriggered";
export interface LimitOrderObject {
objectId: ObjectId;
allocatedCoin: {
coin: CoinType;
amount: Balance;
};
buyCoin: {
coin: CoinType;
amount: Balance;
};
currentAmountSold: Balance;
currentAmountBought: Balance;
recipient: SuiAddress;
created: {
timestamp: Timestamp;
txnDigest: TransactionDigest;
};
finished?: {
timestamp: Timestamp;
txnDigest: TransactionDigest;
};
expiryTimestamp: Timestamp;
status: LimitOrdersOrderStatus;
error?: string;
integratorFee?: LimitOrdersIntegratorFeeData;
outputToInputStopLossExchangeRate?: number;
}
export interface ApiLimitOrdersPastOrdersOwnedBody {
walletAddress: SuiAddress;
}
export interface ApiLimitOrdersActiveOrdersOwnedBody {
walletAddress: SuiAddress;
bytes: string;
signature: string;
}
//# sourceMappingURL=limitOrdersTypes.d.ts.map