Make the most of your coding expertise to unlock market opportunities

Elevate your
competetive edge

Welcome to LIMEX datahub
Вкладки с Подсветкой Синтаксиса

Python

Go

Java

R

#!pip install limexhub
import limexhub
import pandas as pd
api_token = 'API_KEY'
client = limexhub.RestAPI(token=api_token)
models = client.models(vendor = 'boosted')
signals = client.signals(
vendor = 'boosted',
model=models[0]['id'],
symbol="AMZN")
candles = client.candles(symbol="AMZN")
df = pd.merge(candles, signals,
left_on='ts', 
right_on='trade_date')
df['ret'] = df['c'].pct_change(1)
max_w = max(df['allocation'])
df['w'] = df['allocation']/max_w
df['pnl'] = df['ret'].shift(-1) * df['w']
profit = sum(100*df['pnl'].dropna())
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
)
func main() {
token := "WFU9EF92HF" // set token
symbol := "AMZN" // set asset
apiURL := fmt.Sprintf("https://hub.limex.com/v1/news?symbol=%s&token=%s&from=2023-10-01", symbol, token)
// Make HTTP request
response, err := http.Get(apiURL)
if err != nil {
fmt.Println("Error making HTTP request:", err)
return
}
defer response.Body.Close()
// Read response body
body, err := ioutil.ReadAll(response.Body)
if err != nil {
fmt.Println("Error reading response body:", err)
return
}
// Parse JSON
var news []interface{}
err = json.Unmarshal(body, &news)
if err != nil {
fmt.Println("Error parsing JSON:", err)
return
}
// Display the first two elements
for i := 0; i < 2 && i < len(news); i++ {
fmt.Println(news[i])
}
}
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class NewsDownloader {
public static void main(String[] args) {
String token = "WFU9EF92HF"; // set token
String symbol = "AMZN"; // set asset
try {
// Download news
String apiUrl = "https://hub.limex.com/v1/news?symbol=" + symbol + "&token=" + token + "&from=2023-10-01";
String jsonResponse = makeHttpRequest(apiUrl);
// Parse JSON response
ObjectMapper objectMapper = new ObjectMapper();
JsonNode newsNode = objectMapper.readTree(jsonResponse);
// Display the first two elements
for (int i = 0; i < 2 && i < newsNode.size(); i++) {
System.out.println(newsNode.get(i));
}
} catch (IOException e) {
e.printStackTrace();
}
}
private static String makeHttpRequest(String apiUrl) throws IOException {
URL url = new URL(apiUrl);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
int responseCode = connection.getResponseCode();
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
StringBuilder response = new StringBuilder();
String inputLine;
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
return response.toString();
} else {
throw new IOException("HTTP request failed with response code: " + responseCode);
}
}
}
library(jsonlite)
library(data.table)
token = 'WFU9EF92HF' # set token
symbol = 'AMZN' # set asset
# download boosted signals and transform
boostedsignals = (fromJSON(paste0('https://hub.limex.com/v1/signals?vendor=boosted&token=',token,'&model=50678d2d-fd0f-4841-aaee-7feac83cb3a1&from=2022-01-01')))
boostedsignals = data.table(boostedsignals)
boostedsignals[,trade_date:=as.Date(trade_date)]
# download ohlcv data
stock_data=fromJSON(paste0('https://hub.limex.com/v1/candles?symbol=',symbol,'&token=',token,'&from=2022-01-01'))
stock_data$trade_date = as.Date(stock_data$ts)
stock_data$symbol = symbol
stock_data = data.table(stock_data)
# merge this data
total_data = merge(boostedsignals,stock_data,by=c('symbol','trade_date'))
total_data[,ret:=shift(c,-1)/c-1]
total_data[,pnl:=ret*allocation/max(allocation)]
plot(cumprod(total_data$pnl+1)-1,type='l')
grid()

At Limex, we've created a unique hub that is not just about market data; we go a step further by providing actionable trading signals

Introducing DataHub

Use the programming language you are most comfortable with

Language agnostic platform

Acces to signal providers
We connect you with top-tier signal providers, opening the door to a wealth of trading opportunities

Your path to
advanced trading

Historical data for backtesting: access a vast repository of historical market data, enabling you to test and refine your trading strategies with precision
Documentation
Dive into our comprehensive guides and learn how to leverage our platform for your success