Represents a client for interacting with the Wallex.ir cryptocurrency exchange API.

Constructors

Properties

apiKey?: string

The API key for authenticating requests to the Wallex.ir API.

baseUrl: "https://api.wallex.ir" = "https://api.wallex.ir"

The base URL of the Wallex.ir API.

raiseDetailedErrors: boolean = false

Indicates whether to raise detailed errors or not.

requestParams: RequestOptions = {}

Additional request parameters to be included in API requests.

requestTimeout: number = 5000

The timeout duration for HTTP requests in milliseconds.

session: AxiosInstance

The Axios instance used for making HTTP requests.

v1: "v1" = "v1"

API version 1.

v2: "v2" = "v2"

API version 2.

Methods

  • Cancels a specific order.

    Parameters

    • clientOrderId: string

      The client order ID of the order to cancel.

    • kwargs: RequestOptions = {}

      Additional request options (optional).

    Returns Promise<OrderResult>

    A Promise resolving to the order result.

    Throws

    If an error occurs during the request.

  • Creates a complete API URI based on the provided path and version.

    Parameters

    • path: string

      The endpoint path.

    • version: string = ...

      The API version (default: v1).

    Returns string

    The complete API URI.

  • Creates a new order on the authenticated user's account.

    Parameters

    Returns Promise<OrderResult>

    A Promise resolving to the order result.

    Throws

    If an error occurs during the request.

  • Sends a DELETE request to the specified API endpoint.

    Parameters

    • path: string

      The endpoint path.

    • signed: boolean = false

      Indicates whether the request requires authentication (default: false).

    • version: string = ...

      The API version (default: v1).

    • kwargs: RequestOptions = {}

      Additional request options (optional).

    Returns Promise<Response<any>>

    A Promise resolving to the response data.

    Throws

    If an error occurs during the request.

  • Fetches the account fee information of the authenticated user.

    Parameters

    Returns Promise<FeesResult>

    A Promise resolving to the fees result.

    Throws

    If an error occurs during the request.

  • Fetches the balance of a specific asset in the authenticated user's account.

    Parameters

    • asset: string

      The asset for which to fetch the balance.

    • kwargs: RequestOptions = {}

      Additional request options (optional).

    Returns Promise<null | BalanceItem>

    A Promise resolving to the balance item, or null if the asset does not exist in the account.

    Throws

    If an error occurs during the request.

  • Fetches the balances of the authenticated user's account.

    Parameters

    Returns Promise<BalanceResult>

    A Promise resolving to the balance result.

    Throws

    If an error occurs during the request.

  • Fetches the card numbers associated with the authenticated user's account.

    Parameters

    Returns Promise<CardNumbersResult>

    A Promise resolving to the card numbers result.

    Throws

    If an error occurs during the request.

  • Fetches the cryptocurrency deposit history of the authenticated user's account.

    Parameters

    • Optional page: number

      The page number of results to fetch (optional).

    • Optional perPage: number

      The number of results per page (optional).

    • kwargs: RequestOptions = {}

      Additional request options (optional).

    Returns Promise<CryptoDepositResult>

    A Promise resolving to the cryptocurrency deposit history result.

    Throws

    If an error occurs during the request.

  • Fetches the cryptocurrency withdrawal history of the authenticated user's account.

    Parameters

    • Optional page: number

      The page number of results to fetch (optional).

    • Optional perPage: number

      The number of results per page (optional).

    • kwargs: RequestOptions = {}

      Additional request options (optional).

    Returns Promise<CryptoWithdrawalHistoryResult>

    A Promise resolving to the cryptocurrency withdrawal history result.

    Throws

    If an error occurs during the request.

  • Fetches the IBANs associated with the authenticated user's account.

    Parameters

    Returns Promise<IBANsResult>

    A Promise resolving to the IBANs result.

    Throws

    If an error occurs during the request.

  • Fetches OHLC (Open, High, Low, Close) data for a specific symbol within a time range and resolution.

    Parameters

    Returns Promise<OHLCResult>

    A Promise resolving to the OHLC data result.

    Throws

    If an error occurs during the request.

  • Fetches OTC (Over-The-Counter) markets.

    Parameters

    Returns Promise<OTCMarketsResult>

    A Promise resolving to the OTC markets result.

    Throws

    If an error occurs during the request.

  • Fetches the OTC price for a specific symbol and order side.

    Parameters

    • symbol: string

      The trading pair symbol.

    • side: OrderSide

      The side of the order (BUY or SELL).

    • kwargs: RequestOptions = {}

      Additional request options (optional).

    Returns Promise<OTCPricesResult>

    A Promise resolving to the OTC prices result.

    Throws

    If an error occurs during the request.

  • Fetches the open orders of the authenticated user's account.

    Parameters

    • Optional symbol: string

      The trading pair symbol (optional).

    • kwargs: RequestOptions = {}

      Additional request options (optional).

    Returns Promise<OpenOrderResult>

    A Promise resolving to the open order result.

    Throws

    If an error occurs during the request.

  • Fetches the order book for a specific symbol.

    Parameters

    • symbol: string

      The symbol for which to fetch the order book.

    • kwargs: RequestOptions = {}

      Additional request options (optional).

    Returns Promise<OrderBookResult>

    A Promise resolving to the order book result.

    Throws

    If an error occurs during the request.

  • Fetches the status of a specific order.

    Parameters

    • clientOrderId: string

      The client order ID of the order to fetch.

    • kwargs: RequestOptions = {}

      Additional request options (optional).

    Returns Promise<OrderResult>

    A Promise resolving to the order result.

    Throws

    If an error occurs during the request.

  • Fetches the profile information of the authenticated user.

    Parameters

    Returns Promise<ProfileResult>

    A Promise resolving to the profile result.

    Throws

    If an error occurs during the request.

  • Fetches trades for a specific symbol.

    Parameters

    • symbol: string

      The symbol for which to fetch trades.

    • kwargs: RequestOptions = {}

      Additional request options (optional).

    Returns Promise<TradesResult>

    A Promise resolving to the trades result.

    Throws

    If an error occurs during the request.

  • Fetches the user's trade history.

    Parameters

    • Optional symbol: string

      The trading pair symbol (optional).

    • Optional side: OrderSide

      The side of the order (optional).

    • kwargs: RequestOptions = {}

      Additional request options (optional).

    Returns Promise<UserTradesResult>

    A Promise resolving to the user trades result.

    Throws

    If an error occurs during the request.

  • Sends a GET request to the specified API endpoint.

    Parameters

    • path: string

      The endpoint path.

    • signed: boolean = false

      Indicates whether the request requires authentication (default: false).

    • version: string = ...

      The API version (default: v1).

    • kwargs: RequestOptions = {}

      Additional request options (optional).

    Returns Promise<Response<any>>

    A Promise resolving to the response data.

    Throws

    If an error occurs during the request.

  • Retrieves request configuration arguments for making HTTP requests.

    Parameters

    • method: string

      The HTTP request method (e.g., GET, POST, etc.).

    • signed: boolean

      Indicates whether the request requires authentication.

    • kwargs: RequestOptions = {}

      Additional request options (optional).

    Returns AxiosRequestConfig<any>

    The request configuration.

  • Initiates a money withdrawal from the authenticated user's account.

    Parameters

    • iban: number

      The IBAN to withdraw money to.

    • value: number

      The amount of money to withdraw.

    • kwargs: RequestOptions = {}

      Additional request options (optional).

    Returns Promise<MoneyWithdrawalResult>

    A Promise resolving to the money withdrawal result.

    Throws

    If an error occurs during the request.

  • Sends a POST request to the specified API endpoint.

    Parameters

    • path: string

      The endpoint path.

    • signed: boolean = false

      Indicates whether the request requires authentication (default: false).

    • version: string = ...

      The API version (default: v1).

    • kwargs: RequestOptions = {}

      Additional request options (optional).

    Returns Promise<Response<any>>

    A Promise resolving to the response data.

    Throws

    If an error occurs during the request.

  • Performs an HTTP request to the specified URI using the provided method.

    Parameters

    • method: string

      The HTTP request method (e.g., GET, POST, etc.).

    • uri: string

      The complete URI of the API endpoint.

    • signed: boolean = false

      Indicates whether the request requires authentication (default: false).

    • kwargs: RequestOptions = {}

      Additional request options (optional).

    Returns Promise<Response<any>>

    A Promise resolving to the response data.

    Throws

    If an error occurs during the request.

  • Performs an API request to the specified path and version using the provided method.

    Parameters

    • method: string

      The HTTP request method (e.g., GET, POST, etc.).

    • path: string

      The endpoint path.

    • signed: boolean = false

      Indicates whether the request requires authentication (default: false).

    • version: string = ...

      The API version (default: v1).

    • kwargs: RequestOptions = {}

      Additional request options (optional).

    Returns Promise<Response<any>>

    A Promise resolving to the response data.

    Throws

    If an error occurs during the request.

Generated using TypeDoc