SDKs
Our official SDKs provide an easy way to interact with the Arcane Analytics API from your application. We offer support for JavaScript, Python, and PHP.
JavaScript SDK
Our JavaScript SDK is the best way to integrate Arcane Analytics into your web applications.
Installation
Install the Arcane Analytics JavaScript SDK
npm install @arcane/analytics-sdk --save
Client Initialization
import { ArcaneAnalytics } from '@arcane/analytics-sdk'
const client = new ArcaneAnalytics({ apiKey: 'your-api-key' })
Usage Examples
Get Analytics Data
const analytics = await client.analytics.get()
console.log(analytics)
Manage API Keys
// Get current key status
const keyStatus = await client.apiKeys.getCurrent()
// Generate a new key
const newKey = await client.apiKeys.generate()
// Revoke current key
await client.apiKeys.revoke()
Get Market Factors
// Get factors for SPY (default)
const factors = await client.factors.get()
// Get factors for a specific symbol
const factorsForAAPL = await client.factors.get({ symbol: 'AAPL' })
Python SDK
Our Python SDK is ideal for backend services and data analysis scripts.
Installation
Install the Arcane Analytics Python SDK
pip install arcane-analytics
Client Initialization
from arcane_analytics import ArcaneAnalytics
client = ArcaneAnalytics(api_key='your-api-key')
Usage Examples
Get Analytics Data
analytics = client.analytics.get()
print(analytics)
Manage API Keys
# Get current key status
key_status = client.api_keys.get_current()
# Generate a new key
new_key = client.api_keys.generate()
# Revoke current key
client.api_keys.revoke()
Get Market Factors
# Get factors for SPY (default)
factors = client.factors.get()
# Get factors for a specific symbol
factors_for_aapl = client.factors.get(symbol='AAPL')
PHP SDK
Our PHP SDK is perfect for integrating with PHP-based applications.
Installation
Install the Arcane Analytics PHP SDK
composer require arcane/analytics-sdk
Client Initialization
$client = new \Arcane\Analytics(['api_key' => 'your-api-key']);
Usage Examples
Get Analytics Data
$analytics = $client->analytics->get();
var_dump($analytics);
Manage API Keys
// Get current key status
$key_status = $client->apiKeys->getCurrent();
// Generate a new key
$new_key = $client->apiKeys->generate();
// Revoke current key
$client->apiKeys->revoke();
Get Market Factors
// Get factors for SPY (default)
$factors = $client->factors->get();
// Get factors for a specific symbol
$factors_for_aapl = $client->factors->get(['symbol' => 'AAPL']);