@roxyapi/sdk 1.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,690 @@
1
+ # @roxyapi/sdk — Complete Method Reference
2
+
3
+ > TypeScript SDK for RoxyAPI. Multi-domain spiritual and metaphysical intelligence API. Fully typed, zero runtime dependencies. Install: `npm install @roxyapi/sdk`
4
+
5
+ Every method returns `{ data, error, response }`. Parameters use `{ path }` for URL segments, `{ body }` for POST data, `{ query }` for query strings.
6
+
7
+ ```typescript
8
+ import { createRoxy } from '@roxyapi/sdk';
9
+ const roxy = createRoxy(process.env.ROXY_API_KEY!);
10
+ ```
11
+
12
+ ---
13
+
14
+ ## Astrology (Western) — `roxy.astrology`
15
+
16
+ Tropical zodiac, Placidus houses, NASA JPL DE405 validated positions.
17
+
18
+ ### Horoscopes
19
+
20
+ ```typescript
21
+ // Daily horoscope for one sign
22
+ const { data } = await roxy.astrology.getDailyHoroscope({
23
+ path: { sign: 'aries' },
24
+ });
25
+ // Returns: { sign, date, overview, love, career, health, finance, advice, luckyNumber, luckyColor, compatibleSigns }
26
+
27
+ // All 12 daily horoscopes
28
+ const { data } = await roxy.astrology.getAllDailyHoroscopes();
29
+
30
+ // Weekly horoscope
31
+ const { data } = await roxy.astrology.getWeeklyHoroscope({ path: { sign: 'aries' } });
32
+
33
+ // Monthly horoscope
34
+ const { data } = await roxy.astrology.getMonthlyHoroscope({ path: { sign: 'aries' } });
35
+ ```
36
+
37
+ Valid signs: `aries`, `taurus`, `gemini`, `cancer`, `leo`, `virgo`, `libra`, `scorpio`, `sagittarius`, `capricorn`, `aquarius`, `pisces`
38
+
39
+ ### Zodiac Signs and Planets
40
+
41
+ ```typescript
42
+ // All 12 zodiac signs
43
+ const { data } = await roxy.astrology.listZodiacSigns();
44
+
45
+ // Single sign details (personality, compatibility, traits)
46
+ const { data } = await roxy.astrology.getZodiacSign({ path: { identifier: 'aries' } });
47
+
48
+ // All 10 planet meanings
49
+ const { data } = await roxy.astrology.listPlanetMeanings();
50
+
51
+ // Single planet details
52
+ const { data } = await roxy.astrology.getPlanetMeaning({ path: { identifier: 'venus' } });
53
+ ```
54
+
55
+ ### Birth Charts and Calculations
56
+
57
+ All POST. Body requires: `date` (YYYY-MM-DD), `time` (HH:MM:SS), `latitude`, `longitude`. Optional: `timezone` (IANA, e.g. "America/New_York").
58
+
59
+ ```typescript
60
+ // Natal chart — 10 planets, 12 houses, aspects
61
+ const { data } = await roxy.astrology.generateNatalChart({
62
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
63
+ });
64
+
65
+ // Planetary positions (ephemeris)
66
+ const { data } = await roxy.astrology.getPlanetaryPositions({
67
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
68
+ });
69
+
70
+ // House cusps (Placidus, Whole Sign, Equal, Koch)
71
+ const { data } = await roxy.astrology.calculateHouses({
72
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209, houseSystem: 'placidus' },
73
+ });
74
+
75
+ // Planetary aspects
76
+ const { data } = await roxy.astrology.calculateAspects({
77
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
78
+ });
79
+
80
+ // Transits (current planets vs natal)
81
+ const { data } = await roxy.astrology.calculateTransits({
82
+ body: { date: '2026-03-27', time: '12:00:00', latitude: 28.6139, longitude: 77.209 },
83
+ });
84
+
85
+ // Transit aspects with interpretations
86
+ const { data } = await roxy.astrology.calculateTransitAspects({
87
+ body: { date: '2026-03-27', time: '12:00:00', latitude: 28.6139, longitude: 77.209 },
88
+ });
89
+ ```
90
+
91
+ ### Compatibility and Returns
92
+
93
+ ```typescript
94
+ // Compatibility score (0-100 with category breakdown)
95
+ const { data } = await roxy.astrology.calculateCompatibility({
96
+ body: {
97
+ person1: { date: '1990-01-15', time: '14:30:00', latitude: 28.61, longitude: 77.20 },
98
+ person2: { date: '1992-06-20', time: '09:00:00', latitude: 19.07, longitude: 72.87 },
99
+ },
100
+ });
101
+
102
+ // Synastry (relationship aspects between two charts)
103
+ const { data } = await roxy.astrology.calculateSynastry({
104
+ body: {
105
+ person1: { date: '1990-01-15', time: '14:30:00', latitude: 28.61, longitude: 77.20 },
106
+ person2: { date: '1992-06-20', time: '09:00:00', latitude: 19.07, longitude: 72.87 },
107
+ },
108
+ });
109
+
110
+ // Composite chart (midpoint relationship chart)
111
+ const { data } = await roxy.astrology.generateCompositeChart({
112
+ body: {
113
+ person1: { date: '1990-01-15', time: '14:30:00', latitude: 28.61, longitude: 77.20 },
114
+ person2: { date: '1992-06-20', time: '09:00:00', latitude: 19.07, longitude: 72.87 },
115
+ },
116
+ });
117
+
118
+ // Solar return (annual birthday chart)
119
+ const { data } = await roxy.astrology.generateSolarReturn({
120
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.61, longitude: 77.20 },
121
+ });
122
+
123
+ // Lunar return (monthly emotional forecast)
124
+ const { data } = await roxy.astrology.generateLunarReturn({
125
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.61, longitude: 77.20 },
126
+ });
127
+
128
+ // Planetary return (Mercury, Venus, Mars, Jupiter, Saturn)
129
+ const { data } = await roxy.astrology.generatePlanetaryReturn({
130
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.61, longitude: 77.20 },
131
+ });
132
+ ```
133
+
134
+ ### Moon Phases
135
+
136
+ ```typescript
137
+ // Current moon phase
138
+ const { data } = await roxy.astrology.getCurrentMoonPhase();
139
+ // Returns: { date, phase, illumination, age, sign, degree, distance, meaning }
140
+
141
+ // Upcoming phase transitions
142
+ const { data } = await roxy.astrology.getUpcomingMoonPhases();
143
+
144
+ // Monthly moon calendar
145
+ const { data } = await roxy.astrology.getMoonCalendar({ path: { year: 2026, month: 3 } });
146
+ ```
147
+
148
+ ---
149
+
150
+ ## Vedic Astrology — `roxy.vedicAstrology`
151
+
152
+ Sidereal zodiac (Lahiri ayanamsa), Placidus houses, KP system support.
153
+
154
+ ### Birth Charts
155
+
156
+ ```typescript
157
+ // Rashi chart (D1)
158
+ const { data } = await roxy.vedicAstrology.generateBirthChart({
159
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
160
+ });
161
+
162
+ // Navamsa (D9 — marriage compatibility)
163
+ const { data } = await roxy.vedicAstrology.generateNavamsa({
164
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
165
+ });
166
+
167
+ // Any divisional chart (D2-D60)
168
+ const { data } = await roxy.vedicAstrology.generateDivisionalChart({
169
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209, division: 9 },
170
+ });
171
+ ```
172
+
173
+ ### Planetary Positions
174
+
175
+ ```typescript
176
+ // Sidereal positions (9 planets + Lagna)
177
+ const { data } = await roxy.vedicAstrology.getPlanetPositions({
178
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
179
+ });
180
+
181
+ // Monthly ephemeris (daily positions for a month)
182
+ const { data } = await roxy.vedicAstrology.getMonthlyEphemeris({
183
+ body: { date: '2026-03-01', time: '00:00:00', latitude: 28.6139, longitude: 77.209 },
184
+ });
185
+ ```
186
+
187
+ ### Dasha System
188
+
189
+ ```typescript
190
+ // Current Mahadasha/Antardasha/Pratyantardasha
191
+ const { data } = await roxy.vedicAstrology.getCurrentDasha({
192
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
193
+ });
194
+
195
+ // All 9 Mahadasha periods (120-year Vimshottari cycle)
196
+ const { data } = await roxy.vedicAstrology.getMajorDashas({
197
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
198
+ });
199
+
200
+ // Sub-dashas within a Mahadasha
201
+ const { data } = await roxy.vedicAstrology.getSubDashas({
202
+ path: { mahadasha: 'Venus' },
203
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
204
+ });
205
+ ```
206
+
207
+ ### Panchang
208
+
209
+ ```typescript
210
+ // Basic (Tithi, Nakshatra, Yoga, Karana)
211
+ const { data } = await roxy.vedicAstrology.getBasicPanchang({
212
+ body: { date: '2026-03-27', time: '06:00:00', latitude: 28.6139, longitude: 77.209 },
213
+ });
214
+
215
+ // Detailed (all 5 limbs + sunrise/sunset/moonrise)
216
+ const { data } = await roxy.vedicAstrology.getDetailedPanchang({
217
+ body: { date: '2026-03-27', time: '06:00:00', latitude: 28.6139, longitude: 77.209 },
218
+ });
219
+
220
+ // Choghadiya muhurta
221
+ const { data } = await roxy.vedicAstrology.getChoghadiya({
222
+ body: { date: '2026-03-27', latitude: 28.6139, longitude: 77.209 },
223
+ });
224
+
225
+ // Hora (planetary hours)
226
+ const { data } = await roxy.vedicAstrology.getHora({
227
+ body: { date: '2026-03-27', latitude: 28.6139, longitude: 77.209 },
228
+ });
229
+ ```
230
+
231
+ ### Doshas
232
+
233
+ ```typescript
234
+ // Manglik dosha
235
+ const { data } = await roxy.vedicAstrology.checkManglikDosha({
236
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
237
+ });
238
+
239
+ // Kalsarpa dosha
240
+ const { data } = await roxy.vedicAstrology.checkKalsarpaDosha({
241
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
242
+ });
243
+
244
+ // Sadhesati (Saturn transit)
245
+ const { data } = await roxy.vedicAstrology.checkSadhesati({
246
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
247
+ });
248
+ ```
249
+
250
+ ### Compatibility
251
+
252
+ ```typescript
253
+ // Gun Milan (Ashtakoot matching)
254
+ const { data } = await roxy.vedicAstrology.calculateGunMilan({
255
+ body: {
256
+ person1: { date: '1990-01-15', time: '14:30:00', latitude: 28.61, longitude: 77.20 },
257
+ person2: { date: '1992-06-20', time: '09:00:00', latitude: 19.07, longitude: 72.87 },
258
+ },
259
+ });
260
+ ```
261
+
262
+ ### KP (Krishnamurti Paddhati) System
263
+
264
+ ```typescript
265
+ // KP Ayanamsa value
266
+ const { data } = await roxy.vedicAstrology.getKpAyanamsa();
267
+
268
+ // KP planet positions with star/sub lords
269
+ const { data } = await roxy.vedicAstrology.getKpPlanets({
270
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
271
+ });
272
+
273
+ // KP house cusps with ruling lords
274
+ const { data } = await roxy.vedicAstrology.getKpCusps({
275
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
276
+ });
277
+
278
+ // Complete KP chart
279
+ const { data } = await roxy.vedicAstrology.generateKpChart({
280
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
281
+ });
282
+
283
+ // KP ruling planets (horary)
284
+ const { data } = await roxy.vedicAstrology.getKpRulingPlanets({
285
+ body: { date: '2026-03-27', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
286
+ });
287
+
288
+ // KP ruling planets at intervals
289
+ const { data } = await roxy.vedicAstrology.getKpRulingInterval({
290
+ body: { date: '2026-03-27', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
291
+ });
292
+
293
+ // KP sublord boundary changes
294
+ const { data } = await roxy.vedicAstrology.getKpSublordChanges({
295
+ body: { date: '2026-03-27', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
296
+ });
297
+
298
+ // KP rasi (sign) changes
299
+ const { data } = await roxy.vedicAstrology.getKpRasiChanges({
300
+ body: { date: '2026-03-27', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
301
+ });
302
+
303
+ // KP planets at time intervals
304
+ const { data } = await roxy.vedicAstrology.getKpPlanetsInterval({
305
+ body: { date: '2026-03-27', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
306
+ });
307
+ ```
308
+
309
+ ### Aspects, Transits, Parallels
310
+
311
+ ```typescript
312
+ // Planetary aspects (Drishti)
313
+ const { data } = await roxy.vedicAstrology.calculateDrishti({
314
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
315
+ });
316
+
317
+ // Monthly aspect events
318
+ const { data } = await roxy.vedicAstrology.getMonthlyAspects({
319
+ body: { date: '2026-03-01', time: '00:00:00', latitude: 28.6139, longitude: 77.209 },
320
+ });
321
+
322
+ // Lunar aspects for a month
323
+ const { data } = await roxy.vedicAstrology.getLunarAspects({
324
+ body: { date: '2026-03-01', time: '00:00:00', latitude: 28.6139, longitude: 77.209 },
325
+ });
326
+
327
+ // Transit (Gochar) vs natal
328
+ const { data } = await roxy.vedicAstrology.calculateTransit({
329
+ body: { date: '2026-03-27', time: '12:00:00', latitude: 28.6139, longitude: 77.209 },
330
+ });
331
+
332
+ // Monthly sign changes
333
+ const { data } = await roxy.vedicAstrology.getMonthlyTransits({
334
+ body: { date: '2026-03-01', time: '00:00:00', latitude: 28.6139, longitude: 77.209 },
335
+ });
336
+
337
+ // Declination parallels
338
+ const { data } = await roxy.vedicAstrology.calculateParallels({
339
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
340
+ });
341
+
342
+ // Monthly parallels
343
+ const { data } = await roxy.vedicAstrology.getMonthlyParallels({
344
+ body: { date: '2026-03-01', time: '00:00:00', latitude: 28.6139, longitude: 77.209 },
345
+ });
346
+
347
+ // Ecliptic crossings
348
+ const { data } = await roxy.vedicAstrology.getEclipticCrossings({
349
+ body: { date: '2026-03-01', time: '00:00:00', latitude: 28.6139, longitude: 77.209 },
350
+ });
351
+ ```
352
+
353
+ ### Reference Data
354
+
355
+ ```typescript
356
+ // All 12 rashis (Vedic signs)
357
+ const { data } = await roxy.vedicAstrology.listRashis();
358
+ const { data } = await roxy.vedicAstrology.getRashi({ path: { id: 1 } });
359
+
360
+ // All 27 nakshatras
361
+ const { data } = await roxy.vedicAstrology.listNakshatras();
362
+ const { data } = await roxy.vedicAstrology.getNakshatra({ path: { id: 1 } });
363
+
364
+ // 300+ yogas
365
+ const { data } = await roxy.vedicAstrology.listYogas();
366
+ const { data } = await roxy.vedicAstrology.getYoga({ path: { id: 1 } });
367
+ ```
368
+
369
+ ### Strength Analysis
370
+
371
+ ```typescript
372
+ // Upagraha (sub-planet) positions
373
+ const { data } = await roxy.vedicAstrology.getUpagrahaPositions({
374
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
375
+ });
376
+
377
+ // Ashtakavarga (8-fold strength)
378
+ const { data } = await roxy.vedicAstrology.calculateAshtakavarga({
379
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
380
+ });
381
+
382
+ // Shadbala (6-fold strength per BPHS)
383
+ const { data } = await roxy.vedicAstrology.calculateShadbala({
384
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
385
+ });
386
+ ```
387
+
388
+ ---
389
+
390
+ ## Tarot — `roxy.tarot`
391
+
392
+ 78-card Rider-Waite-Smith deck (22 Major Arcana, 56 Minor Arcana).
393
+
394
+ ```typescript
395
+ // List all 78 cards
396
+ const { data } = await roxy.tarot.listCards();
397
+
398
+ // Single card details
399
+ const { data } = await roxy.tarot.getCard({ path: { id: 0 } }); // 0 = The Fool
400
+
401
+ // Draw random cards (1-78)
402
+ const { data } = await roxy.tarot.drawCards({ body: { count: 3 } });
403
+
404
+ // Daily guidance card
405
+ const { data } = await roxy.tarot.getDailyCard({ body: { date: '2026-03-27' } });
406
+
407
+ // Yes/No answer
408
+ const { data } = await roxy.tarot.castYesNo({ body: { question: 'Should I take this job?' } });
409
+
410
+ // Three-card spread (Past, Present, Future)
411
+ const { data } = await roxy.tarot.castThreeCard({ body: { question: 'My career path' } });
412
+
413
+ // Celtic Cross (10 cards, comprehensive)
414
+ const { data } = await roxy.tarot.castCelticCross({ body: { question: 'What should I focus on?' } });
415
+
416
+ // Love spread (5 cards)
417
+ const { data } = await roxy.tarot.castLoveSpread({ body: { question: 'My relationship' } });
418
+
419
+ // Career spread (7 cards, SWOT analysis)
420
+ const { data } = await roxy.tarot.castCareerSpread({ body: { question: 'My career' } });
421
+
422
+ // Custom spread (1-10 cards with named positions)
423
+ const { data } = await roxy.tarot.castCustomSpread({
424
+ body: { positions: ['Current energy', 'Challenge', 'Outcome'] },
425
+ });
426
+ ```
427
+
428
+ ---
429
+
430
+ ## Numerology — `roxy.numerology`
431
+
432
+ Pythagorean system.
433
+
434
+ ```typescript
435
+ // Life Path number
436
+ const { data } = await roxy.numerology.calculateLifePath({
437
+ body: { year: 1990, month: 1, day: 15 },
438
+ });
439
+ // Returns: { number, calculation, type, hasKarmicDebt, meaning }
440
+
441
+ // Expression (Destiny) number
442
+ const { data } = await roxy.numerology.calculateExpression({ body: { name: 'John Smith' } });
443
+
444
+ // Soul Urge (Heart's Desire) number
445
+ const { data } = await roxy.numerology.calculateSoulUrge({ body: { name: 'John Smith' } });
446
+
447
+ // Personality number
448
+ const { data } = await roxy.numerology.calculatePersonality({ body: { name: 'John Smith' } });
449
+
450
+ // Birth Day number
451
+ const { data } = await roxy.numerology.calculateBirthDay({ body: { day: 15 } });
452
+
453
+ // Maturity number (Life Path + Expression)
454
+ const { data } = await roxy.numerology.calculateMaturity({
455
+ body: { date: '1990-01-15', name: 'John Smith' },
456
+ });
457
+
458
+ // Karmic lessons (missing numbers)
459
+ const { data } = await roxy.numerology.analyzeKarmicLessons({ body: { name: 'John Smith' } });
460
+
461
+ // Karmic debt check (13, 14, 16, 19)
462
+ const { data } = await roxy.numerology.checkKarmicDebt({
463
+ body: { date: '1990-01-15', name: 'John Smith' },
464
+ });
465
+
466
+ // Personal year cycle
467
+ const { data } = await roxy.numerology.calculatePersonalYear({
468
+ body: { date: '1990-01-15', currentYear: 2026 },
469
+ });
470
+
471
+ // Compatibility between two people
472
+ const { data } = await roxy.numerology.calculateNumCompatibility({
473
+ body: {
474
+ person1Date: '1990-01-15', person1Name: 'John Smith',
475
+ person2Date: '1992-06-20', person2Name: 'Jane Doe',
476
+ },
477
+ });
478
+
479
+ // Full numerology chart (all numbers combined)
480
+ const { data } = await roxy.numerology.generateNumerologyChart({
481
+ body: { date: '1990-01-15', name: 'John Smith' },
482
+ });
483
+
484
+ // Number meaning (1-9, 11, 22, 33)
485
+ const { data } = await roxy.numerology.getNumberMeaning({ path: { number: 7 } });
486
+
487
+ // Daily numerology number
488
+ const { data } = await roxy.numerology.getDailyNumber({ body: { date: '2026-03-27' } });
489
+ ```
490
+
491
+ ---
492
+
493
+ ## Crystals — `roxy.crystals`
494
+
495
+ Healing properties, zodiac/chakra associations, birthstones.
496
+
497
+ ```typescript
498
+ // All crystals (paginated)
499
+ const { data } = await roxy.crystals.listCrystals();
500
+
501
+ // Single crystal details
502
+ const { data } = await roxy.crystals.getCrystal({ path: { slug: 'amethyst' } });
503
+
504
+ // Search by keyword
505
+ const { data } = await roxy.crystals.searchCrystals({ query: { q: 'love' } });
506
+
507
+ // By zodiac sign
508
+ const { data } = await roxy.crystals.getCrystalsByZodiac({ path: { sign: 'pisces' } });
509
+
510
+ // By chakra
511
+ const { data } = await roxy.crystals.getCrystalsByChakra({ path: { chakra: 'heart' } });
512
+
513
+ // By element
514
+ const { data } = await roxy.crystals.getCrystalsByElement({ path: { element: 'water' } });
515
+
516
+ // Birthstones by month
517
+ const { data } = await roxy.crystals.getBirthstones({ path: { month: 3 } });
518
+
519
+ // Crystal pairings
520
+ const { data } = await roxy.crystals.getCrystalPairings({ path: { slug: 'amethyst' } });
521
+
522
+ // Daily crystal
523
+ const { data } = await roxy.crystals.getDailyCrystal();
524
+
525
+ // Random crystal
526
+ const { data } = await roxy.crystals.getRandomCrystal();
527
+
528
+ // All crystal colors
529
+ const { data } = await roxy.crystals.listCrystalColors();
530
+
531
+ // All planetary associations
532
+ const { data } = await roxy.crystals.listCrystalPlanets();
533
+ ```
534
+
535
+ ---
536
+
537
+ ## I Ching — `roxy.iching`
538
+
539
+ 64 hexagrams, 8 trigrams, traditional coin casting.
540
+
541
+ ```typescript
542
+ // Cast a reading (3-coin method)
543
+ const { data } = await roxy.iching.castReading();
544
+ // Returns: { hexagram, lines, changingLinePositions, resultingHexagram }
545
+
546
+ // Daily hexagram
547
+ const { data } = await roxy.iching.getDailyHexagram({ body: { date: '2026-03-27' } });
548
+
549
+ // Daily reading with changing lines
550
+ const { data } = await roxy.iching.castDailyReading({ body: { date: '2026-03-27' } });
551
+
552
+ // All 64 hexagrams
553
+ const { data } = await roxy.iching.listHexagrams();
554
+
555
+ // Single hexagram by King Wen number (1-64)
556
+ const { data } = await roxy.iching.getHexagram({ path: { number: 1 } });
557
+
558
+ // Random hexagram
559
+ const { data } = await roxy.iching.getRandomHexagram();
560
+
561
+ // Lookup by binary line pattern
562
+ const { data } = await roxy.iching.lookupHexagram({ query: { lines: '111111' } });
563
+
564
+ // All 8 trigrams
565
+ const { data } = await roxy.iching.listTrigrams();
566
+
567
+ // Single trigram
568
+ const { data } = await roxy.iching.getTrigram({ path: { identifier: 'heaven' } });
569
+ ```
570
+
571
+ ---
572
+
573
+ ## Angel Numbers — `roxy.angelNumbers`
574
+
575
+ Angel numbers with spiritual meanings and pattern analysis.
576
+
577
+ ```typescript
578
+ // All angel numbers
579
+ const { data } = await roxy.angelNumbers.listAngelNumbers();
580
+
581
+ // Single angel number meaning
582
+ const { data } = await roxy.angelNumbers.getAngelNumber({ path: { number: '1111' } });
583
+
584
+ // Analyze any number sequence
585
+ const { data } = await roxy.angelNumbers.analyzeNumberSequence({ query: { number: '1234' } });
586
+
587
+ // Daily angel number
588
+ const { data } = await roxy.angelNumbers.getDailyAngelNumber();
589
+ ```
590
+
591
+ ---
592
+
593
+ ## Dreams — `roxy.dreams`
594
+
595
+ Dream symbol dictionary and interpretations.
596
+
597
+ ```typescript
598
+ // Search symbols
599
+ const { data } = await roxy.dreams.searchDreamSymbols({ query: { q: 'flying' } });
600
+
601
+ // Random symbols
602
+ const { data } = await roxy.dreams.getRandomSymbols();
603
+
604
+ // Letter counts (A-Z index)
605
+ const { data } = await roxy.dreams.getSymbolLetterCounts();
606
+
607
+ // Single symbol interpretation
608
+ const { data } = await roxy.dreams.getDreamSymbol({ path: { id: 'flying' } });
609
+
610
+ // Daily dream symbol
611
+ const { data } = await roxy.dreams.getDailyDreamSymbol({ body: { date: '2026-03-27' } });
612
+ ```
613
+
614
+ ---
615
+
616
+ ## Location — `roxy.location`
617
+
618
+ Geocoding helper for birth chart coordinates.
619
+
620
+ ```typescript
621
+ // Search cities (autocomplete)
622
+ const { data } = await roxy.location.searchCities({ query: { q: 'Mumbai' } });
623
+ // Returns array: [{ name, country, latitude, longitude, timezone, ... }]
624
+
625
+ // All 227 countries
626
+ const { data } = await roxy.location.listCountries();
627
+
628
+ // Cities in a country
629
+ const { data } = await roxy.location.getCitiesByCountry({ path: { iso2: 'IN' } });
630
+ ```
631
+
632
+ ---
633
+
634
+ ## Usage — `roxy.usage`
635
+
636
+ Check your API usage and subscription.
637
+
638
+ ```typescript
639
+ const { data } = await roxy.usage.getUsageStats();
640
+ // Returns: { plan, usedThisMonth, requestsPerMonth, remainingThisMonth, email, status, endDate }
641
+ ```
642
+
643
+ ---
644
+
645
+ ## Error Handling
646
+
647
+ Every method returns `{ data, error, response }`:
648
+
649
+ ```typescript
650
+ const { data, error, response } = await roxy.astrology.getDailyHoroscope({
651
+ path: { sign: 'aries' },
652
+ });
653
+
654
+ if (error) {
655
+ console.error('API error:', error);
656
+ console.error('Status:', response?.status);
657
+ return;
658
+ }
659
+
660
+ // data is fully typed after error check
661
+ console.log(data.sign, data.overview);
662
+ ```
663
+
664
+ Common errors:
665
+ - `401` — Invalid or missing API key
666
+ - `403` — Subscription expired or limit reached
667
+ - `404` — Resource not found (invalid sign, id, etc.)
668
+ - `429` — Rate limited
669
+
670
+ ## Advanced Client Configuration
671
+
672
+ ```typescript
673
+ import { Roxy } from '@roxyapi/sdk';
674
+ import { createClient, createConfig } from '@roxyapi/sdk/client';
675
+
676
+ const client = createClient(
677
+ createConfig({
678
+ baseUrl: 'https://roxyapi.com/api/v2',
679
+ auth: process.env.ROXY_API_KEY,
680
+ }),
681
+ );
682
+ const roxy = new Roxy({ client });
683
+ ```
684
+
685
+ ## Links
686
+
687
+ - Interactive API docs: https://roxyapi.com/api-reference
688
+ - Pricing and API keys: https://roxyapi.com/pricing
689
+ - MCP for AI agents: https://roxyapi.com/docs/mcp
690
+ - Source: https://github.com/RoxyAPI/sdk-typescript