About oro-gold
oro-gold is a reference skill for building agents that use ORO GRAIL gold infrastructure, intended for integrators and automation developers. It documents authentication, trading APIs, user and balance endpoints, and common agent workflows for buying and selling gold.
Key features
- 01Describe wallet-signature authentication and API key setup
- 02Retrieve gold prices and buy or sell estimates
- 03Buy or sell gold for users or partners
- 04Create users and retrieve details and balances
- 05Include reference scripts for pricing, balances, and DCA
Use cases
- 01Monitor gold prices and send alerts
- 02Buy gold automatically on a schedule
- 03Track gold holdings for users or agents
- 04Issue agent rewards through a partner treasury
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ behfar-dev/ oro-agent-skill --skill oro-goldAfter installing, type/oro-goldin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
.gitignoreREADME.mdLICENSE.vscode/settings.jsontasks.jsonreferences/dca-agent.mdbalance-checker.mdprice-checker.mdbuy-gold.mdsell-gold.mdreferences/public/fonts/README.mdscripts/oro_dca.py__init__.pyoro_gold.pyDetails
From the project READMEORO Gold Agent Skill
Quick reference for building agents that work with ORO GRAIL gold infrastructure.
Base URL
https://oro-tradebook-devnet.up.railway.app/api
Authentication
- Request challenge → 2. Sign with wallet → 3. Get API key
// Step 1: Request challenge
POST /auth/challenge
{ "walletAddress": "...", "keyType": "PARTNER", "partnerId": "1" }
// Step 2: Sign message with Ed25519 (nacl.sign.detached)
// Step 3: Exchange for API key
POST /auth/api-key
{ "challengeId": "...", "signature": "...", "keyName": "..." }
API key goes in header: x-api-key: your-key
Core Endpoints
| Endpoint | Method | Use |
|---|---|---|
/trading/gold-price | GET | Get current gold price (Pyth oracle) |
/trading/estimate/buy | POST | Calculate USDC cost for gold amount |
/trading/estimate/sell | POST | Calculate USDC received for selling gold |
/trading/purchases/user | POST | Buy gold for a user |
/trading/purchases/partner | POST | Buy gold into partner treasury |
/trading/sales/user | POST | Sell user's gold |
/trading/sales/partner | POST | Sell partner's gold reserves |
/users | POST | Create a user (KYC'd) |
/users/{id} | GET | Get user details + balance |
/distribution/partner/me | GET | Get partner details |
Quick Scripts
See references/ for detailed patterns:
references/price-checker.md- Simple gold price fetchreferences/balance-checker.md- Check user gold balancereferences/buy-gold.md- Purchase gold flowreferences/sell-gold.md- Sell gold flowreferences/dca-agent.md- Dollar Cost Averaging agent
Key Concepts
- Custodial: You hold user gold, they don't see blockchain
- Self-Custody: Users hold GRAIL tokens in their own wallets
- Partner: Your integration account (needs whitelist approval)
- PDA: Program Derived Address - where gold is stored on-chain
Agent Use Cases
- Price Agent - Fetch + alert on gold price movements
- DCA Agent - Auto-buy gold on schedule
- Balance Agent - Track agent/user gold holdings
- Tip Jar - Agent-to-agent gold rewards (via treasury)
Comments
Markdown supported