Skip to content

hogyzen12/atlas-titan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Atlas

Trade on titan with one copy paste, and with easy to use commands. Great for building out bots.

Quick Start

1. Installation

clone this repo
git clone https://github.com/hogyzen12/atlas-titan
cd atlas-titan && cargo build --release && cargo run --bin atlas swap USDC JLP 1 --no-wait

Get Quote

atlas quote <INPUT> <OUTPUT> <AMOUNT>

# Examples:
atlas quote SOL USDC 1.0          # Quote for 1 SOL → USDC
atlas quote BONK USDC 1000000     # Quote for 1M BONK → USDC

Execute Swap (Blocking)

atlas swap <INPUT> <OUTPUT> <AMOUNT>

# Examples:
atlas swap SOL USDC 0.1           # Swap 0.1 SOL for USDC (waits for confirmation)
atlas swap USDC USDT 100          # Swap 100 USDC for USDT

Execute Swap (Non-Blocking)

atlas swap <INPUT> <OUTPUT> <AMOUNT> --no-wait

# Example:
atlas swap SOL USDC 0.1 --no-wait  # Submit and return immediately

View Configuration

atlas config

Configuration

Environment Variables

Variable Description Default
TITAN_API_KEY Titan API key (required) None
RPC_URL or SOLANA_RPC_URL Solana RPC endpoint From Solana CLI config
SOLANA_KEYPAIR or KEYPAIR_PATH Path to keypair file From Solana CLI config
JITO_TIP_LAMPORTS Jito tip amount 100000 (0.0001 SOL)

Configuration Priority

  1. Environment variables
  2. Solana CLI config (~/.config/solana/cli/config.yml)
  3. Defaults

Example: Custom Configuration

export TITAN_API_KEY="your_key"
export RPC_URL="https://mainnet.helius-rpc.com/?api-key=your_helius_key"

atlas swap SOL USDC 0.1

Examples

The examples/ directory contains real-world usage examples:

Simple Swap

cargo run --example simple_swap

Basic swap demonstrating the minimum code needed.

Streaming Quotes

cargo run --example streaming_quotes

Real-time quote monitoring with price tracking and statistics.

Arbitrage Bot

cargo run --example arb_bot

USDC/USDT arbitrage bot that:

  • Monitors for arbitrage opportunities
  • Executes when profit > $0.10
  • Shows live dashboard with stats

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages