Cryptocurrency Prices
curl --request GET \
--url https://stocks-dev.up.railway.app/api/v1/cryptoimport requests
url = "https://stocks-dev.up.railway.app/api/v1/crypto"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://stocks-dev.up.railway.app/api/v1/crypto', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://stocks-dev.up.railway.app/api/v1/crypto",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://stocks-dev.up.railway.app/api/v1/crypto"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://stocks-dev.up.railway.app/api/v1/crypto")
.asString();require 'uri'
require 'net/http'
url = URI("https://stocks-dev.up.railway.app/api/v1/crypto")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"cryptocurrencies": [
{
"symbol": "<string>",
"name": "<string>",
"price": 123,
"change": 123,
"changesPercentage": 123,
"marketCap": 123,
"volume": 123,
"rank": 123
}
],
"timestamp": "<string>"
}FMP Professional
Cryptocurrency Prices
Get real-time cryptocurrency prices and market data
GET
/
api
/
v1
/
crypto
Cryptocurrency Prices
curl --request GET \
--url https://stocks-dev.up.railway.app/api/v1/cryptoimport requests
url = "https://stocks-dev.up.railway.app/api/v1/crypto"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://stocks-dev.up.railway.app/api/v1/crypto', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://stocks-dev.up.railway.app/api/v1/crypto",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://stocks-dev.up.railway.app/api/v1/crypto"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://stocks-dev.up.railway.app/api/v1/crypto")
.asString();require 'uri'
require 'net/http'
url = URI("https://stocks-dev.up.railway.app/api/v1/crypto")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"cryptocurrencies": [
{
"symbol": "<string>",
"name": "<string>",
"price": 123,
"change": 123,
"changesPercentage": 123,
"marketCap": 123,
"volume": 123,
"rank": 123
}
],
"timestamp": "<string>"
}Endpoint
GET /api/v1/crypto
curl "https://stocks-dev.up.railway.app/api/v1/crypto?limit=20"
import requests
response = requests.get("https://stocks-dev.up.railway.app/api/v1/crypto", params={"limit": 50})
data = response.json()
const response = await fetch('https://stocks-dev.up.railway.app/api/v1/crypto?limit=20');
const data = await response.json();
Parameters
integer
default:"20"
Number of cryptocurrencies to return (max 100)
Response
array
string
Response timestamp in ISO format
Example Response
{
"cryptocurrencies": [
{
"symbol": "BTC",
"name": "Bitcoin",
"price": 43250.00,
"change": 1250.50,
"changesPercentage": 2.98,
"marketCap": 850000000000,
"volume": 28500000000,
"rank": 1
},
{
"symbol": "ETH",
"name": "Ethereum",
"price": 2650.75,
"change": -125.25,
"changesPercentage": -4.51,
"marketCap": 320000000000,
"volume": 15200000000,
"rank": 2
},
{
"symbol": "BNB",
"name": "Binance Coin",
"price": 315.80,
"change": 15.60,
"changesPercentage": 5.20,
"marketCap": 48500000000,
"volume": 1800000000,
"rank": 3
}
],
"timestamp": "2025-06-28T18:42:12.471731"
}
Use Cases
Crypto Portfolio Tracking
Crypto Portfolio Tracking
Monitor cryptocurrency holdings and performance:
def track_crypto_portfolio(holdings):
response = requests.get("/api/v1/crypto", params={"limit": 100})
all_cryptos = {crypto["symbol"]: crypto for crypto in response.json()["cryptocurrencies"]}
portfolio_value = 0
for symbol, amount in holdings.items():
if symbol in all_cryptos:
crypto = all_cryptos[symbol]
value = crypto["price"] * amount
portfolio_value += value
print(f"{symbol}: ${value:,.2f} ({crypto['changesPercentage']:+.2f}%)")
return portfolio_value
holdings = {"BTC": 0.5, "ETH": 2.0, "BNB": 10}
total_value = track_crypto_portfolio(holdings)
Market Analysis
Market Analysis
Analyze cryptocurrency market trends:
def analyze_crypto_market():
response = requests.get("/api/v1/crypto", params={"limit": 50})
cryptos = response.json()["cryptocurrencies"]
gainers = [c for c in cryptos if c["changesPercentage"] > 0]
losers = [c for c in cryptos if c["changesPercentage"] < 0]
print(f"Gainers: {len(gainers)}, Losers: {len(losers)}")
print(f"Top gainer: {max(gainers, key=lambda x: x['changesPercentage'])['symbol']}")
print(f"Top loser: {min(losers, key=lambda x: x['changesPercentage'])['symbol']}")
Price Alerts
Price Alerts
Set up price monitoring and alerts:
def check_price_alerts(alerts):
response = requests.get("/api/v1/crypto")
cryptos = {c["symbol"]: c for c in response.json()["cryptocurrencies"]}
triggered_alerts = []
for symbol, target_price, condition in alerts:
if symbol in cryptos:
current_price = cryptos[symbol]["price"]
if (condition == "above" and current_price > target_price) or \
(condition == "below" and current_price < target_price):
triggered_alerts.append({
"symbol": symbol,
"current_price": current_price,
"target_price": target_price,
"condition": condition
})
return triggered_alerts
alerts = [("BTC", 45000, "above"), ("ETH", 2500, "below")]
triggered = check_price_alerts(alerts)
Related Endpoints
Market Gainers
Traditional stock market gainers
Currency Rates
Foreign exchange rates