Python
from pmxt.feed_client import FeedClient
feed = FeedClient("chainlink", pmxt_api_key="YOUR_PMXT_API_KEY")
prices = feed.fetch_historical_prices("BTC/USD", max_size=20, order="desc")
for p in prices:
print(f"{p.datetime}: ${p.last}")import { FeedClient } from "pmxtjs";
const feed = new FeedClient("chainlink", { pmxtApiKey: "YOUR_PMXT_API_KEY" });
const prices = await feed.fetchHistoricalPrices("BTC/USD", {
maxSize: 20,
order: "desc",
});
for (const p of prices) {
console.log(`${p.datetime}: $${p.last}`);
}curl --request GET \
--url https://api.pmxt.dev/api/feeds/{feed}/fetchHistoricalPrices \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pmxt.dev/api/feeds/{feed}/fetchHistoricalPrices"
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}/fetchHistoricalPrices")
.header("Authorization", "Bearer <token>")
.asString();{
"success": true,
"data": [
{
"symbol": "<string>",
"info": "<unknown>",
"timestamp": 123,
"datetime": "2023-11-07T05:31:56Z",
"high": 123,
"low": 123,
"bid": 123,
"bidVolume": 123,
"ask": 123,
"askVolume": 123,
"vwap": 123,
"open": 123,
"close": 123,
"last": 123,
"previousClose": 123,
"change": 123,
"percentage": 123,
"average": 123,
"quoteVolume": 123,
"baseVolume": 123,
"indexPrice": 123,
"markPrice": 123
}
]
}Data Feeds
Fetch Historical Prices
Returns historical price data as tickers within a time range.
GET
/
api
/
feeds
/
{feed}
/
fetchHistoricalPrices
Python
from pmxt.feed_client import FeedClient
feed = FeedClient("chainlink", pmxt_api_key="YOUR_PMXT_API_KEY")
prices = feed.fetch_historical_prices("BTC/USD", max_size=20, order="desc")
for p in prices:
print(f"{p.datetime}: ${p.last}")import { FeedClient } from "pmxtjs";
const feed = new FeedClient("chainlink", { pmxtApiKey: "YOUR_PMXT_API_KEY" });
const prices = await feed.fetchHistoricalPrices("BTC/USD", {
maxSize: 20,
order: "desc",
});
for (const p of prices) {
console.log(`${p.datetime}: $${p.last}`);
}curl --request GET \
--url https://api.pmxt.dev/api/feeds/{feed}/fetchHistoricalPrices \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pmxt.dev/api/feeds/{feed}/fetchHistoricalPrices"
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}/fetchHistoricalPrices")
.header("Authorization", "Bearer <token>")
.asString();{
"success": true,
"data": [
{
"symbol": "<string>",
"info": "<unknown>",
"timestamp": 123,
"datetime": "2023-11-07T05:31:56Z",
"high": 123,
"low": 123,
"bid": 123,
"bidVolume": 123,
"ask": 123,
"askVolume": 123,
"vwap": 123,
"open": 123,
"close": 123,
"last": 123,
"previousClose": 123,
"change": 123,
"percentage": 123,
"average": 123,
"quoteVolume": 123,
"baseVolume": 123,
"indexPrice": 123,
"markPrice": 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 (e.g. BTC/USD)
Start unix timestamp (seconds)
End unix timestamp (seconds)
Max records to return
Sort order
Available options:
asc, desc Was this page helpful?

