The ATM Library is a powerful AI agent for trading. This guide provides a step-by-step process to integrate and utilize the library in your project.
Getting Started
Installation
To use the ATM library, install it using your preferred package manager:
npminstallatmai# oryarnaddatmai
Setup
API Configuration
To initialize the library, you need your API key, secret, and API URL. Obtain these from your ATM account.
1. API Key and Secret:
• Login to your ATM account.
• Navigate to the API section to generate or retrieve your credentials.
2. Whitelisted API URL:
• Use the provided URL for your whitelisted environment.
Initialization
Create a new file (e.g., atmConfig.ts) and configure the library:
import { ATM } from'atmai';// Replace these placeholders with your actual credentialsconstAPI_KEY='{your-api-key-here}';constAPI_SECRET='{your-api-secret-here}';constAPI_URL='https://api.atmai.fun';exportconstatm=newATM({ apiKey:API_KEY, apiSecret:API_SECRET, apiUrl:API_URL,});
Usage
1. Fetch Portfolio Summary
Retrieve a portfolio summary for the last 24 hours: