Python
from pmxt.feed_client import FeedClient
feed = FeedClient("binance", pmxt_api_key="YOUR_PMXT_API_KEY")
candles = feed.fetch_ohlcv("BTC/USDT", timeframe="1m", since=1700000000000, limit=3)
for timestamp, open_, high, low, close, volume in candles:
print(timestamp, close)import { FeedClient } from "pmxtjs";
const feed = new FeedClient("binance", { pmxtApiKey: "YOUR_PMXT_API_KEY" });
const candles = await feed.fetchOHLCV("BTC/USDT", "1m", 1700000000000, 3);
for (const [timestamp, _open, _high, _low, close, _volume] of candles) {
console.log(timestamp, close);
}curl --request GET \
--url https://api.pmxt.dev/api/feeds/{feed}/fetchOHLCV \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pmxt.dev/api/feeds/{feed}/fetchOHLCV"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.pmxt.dev/api/feeds/{feed}/fetchOHLCV")
.header("Authorization", "Bearer <token>")
.asString();{
"success": true,
"data": [
[
123
]
]
}Data Feeds
Fetch OHLCV
Returns OHLCV candle data for a symbol.
GET
/
api
/
feeds
/
{feed}
/
fetchOHLCV
Python
from pmxt.feed_client import FeedClient
feed = FeedClient("binance", pmxt_api_key="YOUR_PMXT_API_KEY")
candles = feed.fetch_ohlcv("BTC/USDT", timeframe="1m", since=1700000000000, limit=3)
for timestamp, open_, high, low, close, volume in candles:
print(timestamp, close)import { FeedClient } from "pmxtjs";
const feed = new FeedClient("binance", { pmxtApiKey: "YOUR_PMXT_API_KEY" });
const candles = await feed.fetchOHLCV("BTC/USDT", "1m", 1700000000000, 3);
for (const [timestamp, _open, _high, _low, close, _volume] of candles) {
console.log(timestamp, close);
}curl --request GET \
--url https://api.pmxt.dev/api/feeds/{feed}/fetchOHLCV \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pmxt.dev/api/feeds/{feed}/fetchOHLCV"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.pmxt.dev/api/feeds/{feed}/fetchOHLCV")
.header("Authorization", "Bearer <token>")
.asString();{
"success": true,
"data": [
[
123
]
]
}Authorizations
Required when calling the hosted API directly (curl, requests, fetch). SDK users pass credentials via constructor params instead.
Path Parameters
The data feed provider.
Available options:
binance, chainlink Query Parameters
Trading pair
Candle interval (e.g. 1m, 5m, 1h, 1d)
Start timestamp in ms
Max candles to return
Was this page helpful?

