File size: 5,052 Bytes
88192b0
 
 
 
 
 
6ad462a
 
f070079
6ad462a
 
f606f9a
6ad462a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
---
license: mit
language:
- en
pipeline_tag: reinforcement-learning
---
# NolandAI 🐙🚢

[![Hugging Face](https://img.shields.io/badge/🤗-HuggingFace-yellow)](https://huggingface.co/piccassol/Noland)  
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)

**NolandAI** is an AI-powered Solana trading agent that combines on-chain analytics, social sentiment scraping, and a fine-tuned LLM to generate actionable trading calls. It ships as an npm SDK plus a FastAPI backend and a React/Next.js UI.

---

## 🔦 Highlights
- **Real-time market feeds** via Dexscreener.  
- **Social scraping** (AssetDash, X/Twitter monitoring such as `@mobyagent`, `@whalewatch`).  
- **LLM forecasting** using a LoRA-fine-tuned model (`fingpt-forecaster_dow30_llama2-7b_lora` on Hugging Face).  
- **Automated trading calls** (hourly), plus optional auto-posting to X/Twitter.  
- **Modular SDK** (`nolandai` npm package) for JS/TS integration.  
- **Production CI** with release workflow and npm publish.

---

## 📦 Installation

### From npm (recommended)
```bash
npm install nolandai
ts
Copy code
import { NolandAI } from "nolandai";

const bot = new NolandAI({ apiKey: process.env.NOLAND_KEY });
const call = await bot.getTradingCall();
console.log(call);
From source (dev)
bash
Copy code
git clone https://github.com/your-username/NolandAI.git
cd NolandAI
npm install           # frontend/sdk
pip install -r requirements.txt  # if running python FastAPI backend
🧩 Repository layout (recommended)
pgsql
Copy code
NolandAI/
├─ package.json
├─ index.js
├─ index.d.ts
├─ README.md
├─ LICENSE
├─ CHANGELOG.md
├─ CONTRIBUTING.md
├─ .github/
│  └─ workflows/ci.yml
├─ backend/
│  ├─ requirements.txt
│  └─ main.py                # FastAPI app (endpoints: /trading-call, /market-data/:token)
├─ frontend/
│  └─ (Next.js app)
└─ examples/
   └─ demo.js
⚙️ Quickstart — Local dev (SDK + demo backend)
Start FastAPI backend (example):

bash
Copy code
# in backend/
uvicorn main:app --reload --port 8000
Test SDK locally:

bash
Copy code
# from repo root or examples/
node examples/demo.js
📚 API (SDK)
new NolandAI(config?: { apiKey?: string; baseUrl?: string })

getTradingCall() → { token, action, confidence, reason }

getMarketData(tokenAddress: string) → market JSON from backend

🧪 Example examples/demo.js
(see examples/demo.js file in repo — quick show of getTradingCall + getMarketData)

📦 Publish & Releases
We publish releases using semantic version tags (vMAJOR.MINOR.PATCH) and CI that validates tests and publishes to npm on tag push. See .github/workflows/ci.yml.

Official release example:

v1.0.0 — Captain’s Log (2025-09-20)

Initial public release.

npm package nolandai published.

FastAPI endpoints /trading-call, /market-data/:token live.

Hugging Face model integration.

🏛️ Contributing
See CONTRIBUTING.md. Pull requests welcome — use branches, add tests, sign commits.

⚖️ License
MIT © 2025 AuroraRift

Maintainers
AuroraRift Team — team@aurorarift.io

Changelog
See CHANGELOG.md for full release history.

pgsql
Copy code

---

# 2) Files to create (copy these into repo root exactly)

Below are the key files. Put them where indicated.

## `package.json` (repo root)
```json
{
  "name": "nolandai",
  "version": "1.0.0",
  "description": "NolandAI - An AI-powered Solana trading agent for market intelligence, social scraping, and automated trading calls.",
  "main": "index.js",
  "types": "index.d.ts",
  "type": "module",
  "scripts": {
    "build": "tsc",
    "test": "node test.js || echo \"no tests\"",
    "lint": "eslint ."
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/your-username/NolandAI.git"
  },
  "keywords": [
    "AI",
    "trading",
    "Solana",
    "crypto",
    "blockchain",
    "LLM",
    "bot",
    "Dexscreener",
    "NolandAI",
    "AuroraRift"
  ],
  "author": "AuroraRift Team <team@aurorarift.io>",
  "license": "MIT",
  "bugs": {
    "url": "https://github.com/your-username/NolandAI/issues"
  },
  "homepage": "https://huggingface.co/your-username/NolandAI",
  "engines": {
    "node": ">=18"
  },
  "dependencies": {
    "axios": "^1.7.0",
    "dotenv": "^16.3.1"
  },
  "devDependencies": {
    "eslint": "^8.56.0",
    "typescript": "^5.4.0"
  }
}
index.js (repo root)
js
Copy code
import axios from "axios";
import dotenv from "dotenv";

dotenv.config();

export class NolandAI {
  constructor(config = {}) {
    this.apiKey = config.apiKey || process.env.NOLAND_KEY || "";
    this.baseUrl = config.baseUrl || "http://localhost:8000"; // FastAPI default
  }

  async getTradingCall() {
    const res = await axios.get(`${this.baseUrl}/trading-call`, {
      headers: this.apiKey ? { Authorization: `Bearer ${this.apiKey}` } : {}
    });
    return res.data;
  }

  async getMarketData(tokenAddress) {
    const res = await axios.get(`${this.baseUrl}/market-data/${tokenAddress}`);
    return res.data;
  }
}

export default NolandAI;