@astonic-io/astonic-sdk
Version:
Official SDK for interacting with the Astonic Protocol
34 lines (33 loc) • 1.57 kB
TypeScript
import { Address, TradingLimit, TradingLimitsConfig, TradingLimitsState } from './interfaces';
import { Broker } from '@astonic-io/astonic-bindings-ts';
/**
* Returns the limit configuration in the broker for the given exchange and asset
* @param broker an instance of the broker
* @param exchangeId the id of the exchange
* @param asset the address of the limited asset
* @returns the limit configuration
*/
export declare function getLimitsConfig(broker: Broker, exchangeId: string, asset: Address): Promise<TradingLimitsConfig>;
/**
* Returns the limit state in the broker for the given exchange and asset
* @param broker an instance of the broker
* @param exchangeId the id of the exchange
* @param asset the address of the limited asset
* @returns the limit state
*/
export declare function getLimitsState(broker: Broker, exchangeId: string, asset: Address): Promise<TradingLimitsState>;
/**
* Returns a human-friendly representation of the limits for the given exchange and asset
* @param broker an instance of the broker
* @param exchangeId the id of the exchange
* @param asset the address of the asset with the limit
* @returns a list of TradingLimit objects
*/
export declare function getLimits(broker: Broker, exchangeId: string, asset: Address): Promise<TradingLimit[]>;
/**
* Returns the limit id for the given exchange and asset
* @param exchangeId the id of the exchange
* @param asset the address of the asset with the limit
* @returns the limit id
*/
export declare function getLimitId(exchangeId: string, asset: Address): string;