skills/aster-deposit-fund/SKILL.md
Deposit funds to Aster from a wallet; private key from env. Use when the user wants to deposit to Aster or fund an Aster account.
npx skillsauth add asterdex/aster-skills-hub aster-deposit-fundInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Base URL: https://www.asterdex.com/bapi/futures/v1/public/future/. Public endpoints; no auth.
| Var | Required | Description |
|-----|----------|-------------|
| ASTER_DEPOSIT_PRIVATE_KEY | Yes (deposit) | Wallet private key (0x + 64 hex). Used to sign on-chain deposit txs. Never log or echo. |
| ASTER_WALLET_ADDRESS | Yes (balance) | Public wallet address. Used by balance.mjs for read-only queries. |
| ETH_RPC_URL | Recommended | Private Ethereum RPC (Alchemy, Infura). Public fallback used if unset. |
| BSC_RPC_URL | Recommended | Private BSC RPC. |
| ARBITRUM_RPC_URL | Recommended | Private Arbitrum RPC. |
| Chain | chainId | |-------|---------| | ETH (Ethereum) | 1 | | BSC | 56 | | Arbitrum | 42161 |
MANDATORY — Before executing ANY deposit transaction, the agent MUST:
Failure to confirm is a critical safety violation in an autonomous agent context.
aster/withdraw/assets?chainIds=<chainId>&networks=EVM&accountType=perp. Response data[]: name, contractAddress, decimals, isNative, chainId. Use to pick asset and token contract for ERC20.web3/ae/deposit-address?chainId=<chainId>. Response data = deposit address (string). Same address for native and ERC20 on that chain. The address is validated against a hardcoded whitelist in common.mjs (SEC-01).treasury.depositNative(broker) with value = amount (wei).token.approve(treasury, amount) then treasury.deposit(token, amount, broker).process.env after account derivation (SEC-02).balance.mjs never loads the private key; it uses the public address only (SEC-07).The --broker parameter (default: 1) identifies the Aster broker account that the deposit is attributed to. Broker 1 is the primary/default Aster broker. Only change this if you know the target broker ID. An incorrect broker ID may result in funds being inaccessible from the expected account (SEC-11).
Optional: scripts/ — Bun + viem. Install: cd skills/aster-deposit-fund/scripts && bun install.
| Script | Purpose |
|--------|---------|
| deposit.mjs | Deposit: ASTER_DEPOSIT_PRIVATE_KEY=0x... bun run deposit.mjs --chain <eth\|bsc\|arbitrum> --asset <SYMBOL> --amount <amount> [--broker <id>] [--dry-run] |
| balance.mjs | Wallet balances (read-only): bun run balance.mjs --chain <eth\|bsc\|arbitrum> --address <0x...> |
See .env.example in the repo root for all env vars.
Payload shapes: reference.md.
development
WebSocket market + user data streams for Aster Futures API v3. Subscription model, stream names, listenKey. Use when implementing real-time market or user events (orders, balance, positions). listenKey = signed; see aster-api-auth-v3.
development
WebSocket market + user data streams for Aster Futures API v1. Subscription model, stream names, listenKey (/fapi/v1/listenKey). Use when implementing real-time market or user events (orders, balance, positions). listenKey = signed; see aster-api-auth-v1.
development
Place, cancel, batch, and query orders for Aster Futures API v3 (/fapi/v3/). Use when placing/canceling orders or querying open/historical. Signed; see aster-api-auth-v3.
development
Place, cancel, batch, countdown-cancel, and query orders for Aster Futures API v1 (/fapi/v1/). Use when placing/canceling orders or querying open/historical. Signed; see aster-api-auth-v1.