Algodex API v1

💱 Algodex API

The following is the 1.0 backend API for Algodex. This is a DeFi service to allow users to trade assets on the Algorand network directly between each other, with wallets hosted elsewhere on MyAlgo Wallet.
The 2.0 backend is a major architectural refactoring and is currently under development.

Endpoints

Algodex Mainnet: https://app.algodex.com/[api here]
Algodex Testnet: https://testnet.algodex.com/[api here]

📝 API Documentation

Fetching a list of all orders for an ASA

Params
  • assetId: the asset ID to search orders for
  • getAssetInfo (optional): set to true to also return asset information
Example
get
https://testnet.algodex.com/algodex-backend
/orders.php
Fetch Asset Orders

Fetching a list of orders for a wallet

Params
  • ownerAddr: the owner address to search orders for
  • getAssetInfo (optional): set to true to also return asset information
Example
get
https://testnet.algodex.com/algodex-backend
/orders.php
Fetch Wallet Orders

Fetching the trade history for an ASA

Params
  • assetId: the asset ID to search the trade history for
  • getAssetInfo (optional): set to true to also return asset information
Example
get
https://testnet.algodex.com/algodex-backend
/trade_history.php
Fetch Asset TradeHistory

Fetching the trade history for a wallet

Params
  • ownerAddr: the owner address to search the trade history for
  • getAssetInfo (optional): set to true to also return asset information
Example
get
https://testnet.algodex.com/algodex-backend
/trade_history.php
Fetch Wallet TradeHistory

Fetching all recently traded ASAs, their prices, and information

Params
None currently. This will eventually have different sort parameters.

Fetching chart info for an ASA

This currently returns the trades aggregated for the daily frequency. This will eventually different chart options
Params
assetId: the asset ID to get the chart information for chartTime: Time interval to pick from ['1m', '5m', '15m', '1h', '4h', '1d']
Example
get
https://testnet.algodex.com/algodex-backend
/charts2.php
Fetch Asset Chart

Getting complete asset information for an asset that is traded or untraded

This will fetch asset for an information that is either traded or untraded
Params
  • assetId: the assetId of the asset

Searching Asset information by name or ID

This will query both Algodex and Algoexplorer and present results for both
Params
query: The query string. This can be an integer (for the asset id), or a string to search for the asset name or unit name. Partial name matches work as well.
Examples
get
https://testnet.algodex.com/algodex-backend
/asset_search.php
Search Assets

Getting package and smart contract version

This is for checking compatibility between the client and the server. If the escrowContractVersion is different, then any orders placed into the order book will not show up in the UI!

Getting asset information for a wallet address

This will query Algodex and return all the assets belonging to a wallet, along with price information and how many are in orders
Params
  • ownerAddr: the owner address to retrieve the assets for.
Examples
get
https://testnet.algodex.com/algodex-backend
/wallet_assets.php
Fetch Wallet Assets

Getting asset information for all assets

Examples
get
https://api-testnet-public.algodex.com/algodex-backend
/assets.php
Fetch Assets