For the complete documentation index, see llms.txt. This page is also available as Markdown.

Installation Setup

Overview of supported trading markets and installation prerequisites for using the API.

Testnet Supported Markets

Asset

Market ID

Description

APT-USD

1338

Aptos-based trading market.

BTC-USD

1339

Bitcoin-based trading market.

ETH-USD

1340

Ethereum-based trading market.

SOL-USD

2387

Solana-based trading market.

Mainnet Supported Markets

Asset

Market ID

Description

APT-USD

14

Aptos-based trading market.

BTC-USD

15

Bitcoin-based trading market.

ETH-USD

16

Ethereum-based trading market.

SOL-USD

31

Solana-based trading market.

Prerequisites

Before using the API, ensure you have the following:

  1. Node.js: Install version 16 or higher. Download here.

  2. npm: Verify npm is installed to manage packages.

Install Required Packages

Run these commands to install the required dependencies:

  1. Install dotenv and axios:

  2. Install the Aptos SDK for TypeScript:

Example Setup in TypeScript

Create a file, e.g., setup.ts, and use the following code:

Size Conversion Details:

APT Market

  • base_decimals: 8

  • lot_size_multiplier: 100000

BTC Market

  • base_decimals: 8

  • lot_size_multiplier: 1000

ETH Market

  • base_decimals: 8

  • lot_size_multiplier: 10000

Size Conversion Example in TypeScript:

Price Conversion Details:

APT Market

  • price_precision: 3

BTC Market

  • price_precision: 0

ETH Market

  • price_precision: 1

Price Conversion Example in TypeScript:

Last updated