Introduction
PriceSignal provides a powerful GraphQL API for accessing real-time cryptocurrency price data, managing price alerts, and subscribing to live market updates. The API supports queries, mutations, and WebSocket-based subscriptions.Endpoint
The GraphQL API is available at a single endpoint:All API requests require authentication using Firebase JWT tokens. See the Authentication guide for details.
Core Features
Queries
Retrieve cryptocurrency price data with flexible filtering, sorting, and pagination:- getPrices - Fetch historical price candles across multiple timeframes (1m, 5m, 10m, 15m, 1h)
- Instruments - Query available trading pairs and cryptocurrencies
- Price Rules - Retrieve user-defined price alerts and conditions
- Exchanges - Get supported exchange information
Mutations
Manage price alerts and user preferences:- createPriceRule - Set up custom price alerts with conditions
- updatePriceRule - Modify existing alert rules
- deletePriceRule - Remove price alerts
- togglePriceRule - Enable or disable alerts
Subscriptions
Receive real-time price updates via WebSocket:- onPriceUpdated - Subscribe to live price changes for specific symbols
GraphQL Features
Pagination
All paginated queries support cursor-based pagination:Number of items to return (max: 500)
Cursor for pagination forward
Number of items to return from the end
Cursor for pagination backward
Filtering & Sorting
The API supports advanced filtering and sorting on most queries using HotChocolate conventions:Automatic Persisted Queries
The API supports Automatic Persisted Queries (APQ) to reduce bandwidth:- Send the query hash instead of the full query
- If the server doesn’t recognize the hash, it will request the full query
- Subsequent requests can use just the hash
Example Query
Price Intervals
The API supports the following timeframes for price candles:1-minute candles
5-minute candles
10-minute candles
15-minute candles
1-hour candles
GraphQL Introspection
You can explore the full schema using GraphQL introspection or by visiting the GraphQL Playground in development mode.Next Steps
Authentication
Learn how to authenticate your API requests with Firebase JWT
WebSocket Subscriptions
Set up real-time price updates using WebSocket subscriptions