Complete Crypto System API
Full cryptocurrency platform with coins, markets, wallets, transactions, and portfolio tracking
Alerts
User price alerts
/api/crypto/alerts
Auth Required
User Filtering
Retrieve a paginated list of all alerts
GET /api/crypto/alerts
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
{
"data": [
{
"user_id": 1,
"user_name": "Robert Johnson",
"cryptocurrency_symbol": "BTC",
"alert_type": "above",
"target_price": 45000,
"current_price": 43250.5,
"is_triggered": false,
"created_at": "2024-01-18T10:00:00Z",
"triggered_at": null
},
...
],
"meta": {
"current_page": 1,
"total": 50,
"per_page": 15
}
}
/api/crypto/alerts/{id}
Auth Required
Retrieve a single alert by ID
GET /api/crypto/alerts/1
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
{
"user_id": 1,
"user_name": "Robert Johnson",
"cryptocurrency_symbol": "BTC",
"alert_type": "above",
"target_price": 45000,
"current_price": 43250.5,
"is_triggered": false,
"created_at": "2024-01-18T10:00:00Z",
"triggered_at": null
}
{
"error": "Resource not found",
"message": "The requested alert does not exist"
}
/api/crypto/alerts
Auth Required
Auto User ID
Create a new alert
POST /api/crypto/alerts
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json
{
"user_id": 1,
"user_name": "Robert Johnson",
"cryptocurrency_symbol": "BTC",
"alert_type": "above",
"target_price": 45000,
"current_price": 43250.5,
"is_triggered": false,
"triggered_at": null
}
{
"user_id": 1,
"user_name": "Robert Johnson",
"cryptocurrency_symbol": "BTC",
"alert_type": "above",
"target_price": 45000,
"current_price": 43250.5,
"is_triggered": false,
"created_at": "2024-01-18T10:00:00Z",
"triggered_at": null
}
/api/crypto/alerts/{id}
Public
Update an existing alert
PUT /api/crypto/alerts/1
Content-Type: application/json
{
"user_id": 1,
"user_name": "Robert Johnson",
"cryptocurrency_symbol": "BTC",
"alert_type": "above",
"target_price": 45000,
"current_price": 43250.5,
"is_triggered": false,
"triggered_at": null
}
{
"user_id": 1,
"user_name": "Robert Johnson",
"cryptocurrency_symbol": "BTC",
"alert_type": "above",
"target_price": 45000,
"current_price": 43250.5,
"is_triggered": false,
"created_at": "2024-01-18T10:00:00Z",
"triggered_at": null
}
/api/crypto/alerts/{id}
Auth Required
Ownership Check
Delete a alert by ID
DELETE /api/crypto/alerts/1
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
{
"message": "Alert deleted successfully"
}
{
"error": "Deletion failed",
"message": "Unable to delete the resource"
}
Cryptocurrencies
Available cryptocurrencies and tokens
/api/crypto/cryptocurrencies
Public
Retrieve a paginated list of all cryptocurrencies
GET /api/crypto/cryptocurrencies
Accept: application/json
{
"data": [
{
"symbol": "BTC",
"name": "Bitcoin",
"logo": "\u20bf",
"current_price": 43250.5,
"market_cap": 847500000000,
"volume_24h": 28500000000,
"price_change_24h": 1234.5,
"price_change_percentage_24h": 2.939999999999999946709294817992486059665679931640625,
"circulating_supply": 19600000,
"total_supply": 21000000,
"rank": 1
},
...
],
"meta": {
"current_page": 1,
"total": 50,
"per_page": 15
}
}
/api/crypto/cryptocurrencies/{id}
Public
Retrieve a single cryptocurrencie by ID
GET /api/crypto/cryptocurrencies/1
Accept: application/json
{
"symbol": "BTC",
"name": "Bitcoin",
"logo": "\u20bf",
"current_price": 43250.5,
"market_cap": 847500000000,
"volume_24h": 28500000000,
"price_change_24h": 1234.5,
"price_change_percentage_24h": 2.939999999999999946709294817992486059665679931640625,
"circulating_supply": 19600000,
"total_supply": 21000000,
"rank": 1
}
{
"error": "Resource not found",
"message": "The requested cryptocurrencie does not exist"
}
/api/crypto/cryptocurrencies
Public
Create a new cryptocurrencie
POST /api/crypto/cryptocurrencies
Content-Type: application/json
{
"symbol": "BTC",
"name": "Bitcoin",
"logo": "\u20bf",
"current_price": 43250.5,
"market_cap": 847500000000,
"volume_24h": 28500000000,
"price_change_24h": 1234.5,
"price_change_percentage_24h": 2.939999999999999946709294817992486059665679931640625,
"circulating_supply": 19600000,
"total_supply": 21000000,
"rank": 1
}
{
"symbol": "BTC",
"name": "Bitcoin",
"logo": "\u20bf",
"current_price": 43250.5,
"market_cap": 847500000000,
"volume_24h": 28500000000,
"price_change_24h": 1234.5,
"price_change_percentage_24h": 2.939999999999999946709294817992486059665679931640625,
"circulating_supply": 19600000,
"total_supply": 21000000,
"rank": 1
}
/api/crypto/cryptocurrencies/{id}
Public
Update an existing cryptocurrencie
PUT /api/crypto/cryptocurrencies/1
Content-Type: application/json
{
"symbol": "BTC",
"name": "Bitcoin",
"logo": "\u20bf",
"current_price": 43250.5,
"market_cap": 847500000000,
"volume_24h": 28500000000,
"price_change_24h": 1234.5,
"price_change_percentage_24h": 2.939999999999999946709294817992486059665679931640625,
"circulating_supply": 19600000,
"total_supply": 21000000,
"rank": 1
}
{
"symbol": "BTC",
"name": "Bitcoin",
"logo": "\u20bf",
"current_price": 43250.5,
"market_cap": 847500000000,
"volume_24h": 28500000000,
"price_change_24h": 1234.5,
"price_change_percentage_24h": 2.939999999999999946709294817992486059665679931640625,
"circulating_supply": 19600000,
"total_supply": 21000000,
"rank": 1
}
/api/crypto/cryptocurrencies/{id}
Public
Delete a cryptocurrencie by ID
DELETE /api/crypto/cryptocurrencies/1
Accept: application/json
{
"message": "Cryptocurrencie deleted successfully"
}
{
"error": "Deletion failed",
"message": "Unable to delete the resource"
}
Exchanges
Cryptocurrency exchanges information
/api/crypto/exchanges
Public
Retrieve a paginated list of all exchanges
GET /api/crypto/exchanges
Accept: application/json
{
"data": [
{
"name": "Binance",
"country": "Global",
"logo": "https://picsum.photos/100/100?random=ex1",
"trust_score": 10,
"volume_24h_btc": 125000,
"year_established": 2017
},
...
],
"meta": {
"current_page": 1,
"total": 50,
"per_page": 15
}
}
/api/crypto/exchanges/{id}
Public
Retrieve a single exchange by ID
GET /api/crypto/exchanges/1
Accept: application/json
{
"name": "Binance",
"country": "Global",
"logo": "https://picsum.photos/100/100?random=ex1",
"trust_score": 10,
"volume_24h_btc": 125000,
"year_established": 2017
}
{
"error": "Resource not found",
"message": "The requested exchange does not exist"
}
/api/crypto/exchanges
Public
Create a new exchange
POST /api/crypto/exchanges
Content-Type: application/json
{
"name": "Binance",
"country": "Global",
"logo": "https://picsum.photos/100/100?random=ex1",
"trust_score": 10,
"volume_24h_btc": 125000,
"year_established": 2017
}
{
"name": "Binance",
"country": "Global",
"logo": "https://picsum.photos/100/100?random=ex1",
"trust_score": 10,
"volume_24h_btc": 125000,
"year_established": 2017
}
/api/crypto/exchanges/{id}
Public
Update an existing exchange
PUT /api/crypto/exchanges/1
Content-Type: application/json
{
"name": "Binance",
"country": "Global",
"logo": "https://picsum.photos/100/100?random=ex1",
"trust_score": 10,
"volume_24h_btc": 125000,
"year_established": 2017
}
{
"name": "Binance",
"country": "Global",
"logo": "https://picsum.photos/100/100?random=ex1",
"trust_score": 10,
"volume_24h_btc": 125000,
"year_established": 2017
}
/api/crypto/exchanges/{id}
Public
Delete a exchange by ID
DELETE /api/crypto/exchanges/1
Accept: application/json
{
"message": "Exchange deleted successfully"
}
{
"error": "Deletion failed",
"message": "Unable to delete the resource"
}
Markets
Trading pairs and market data
/api/crypto/markets
Public
Retrieve a paginated list of all markets
GET /api/crypto/markets
Accept: application/json
{
"data": [
{
"pair": "BTC/USDT",
"base_currency": "BTC",
"quote_currency": "USDT",
"last_price": 43250.5,
"bid": 43248.300000000002910383045673370361328125,
"ask": 43252.699999999997089616954326629638671875,
"volume_24h": 15600,
"high_24h": 43890,
"low_24h": 42540
},
...
],
"meta": {
"current_page": 1,
"total": 50,
"per_page": 15
}
}
/api/crypto/markets/{id}
Public
Retrieve a single market by ID
GET /api/crypto/markets/1
Accept: application/json
{
"pair": "BTC/USDT",
"base_currency": "BTC",
"quote_currency": "USDT",
"last_price": 43250.5,
"bid": 43248.300000000002910383045673370361328125,
"ask": 43252.699999999997089616954326629638671875,
"volume_24h": 15600,
"high_24h": 43890,
"low_24h": 42540
}
{
"error": "Resource not found",
"message": "The requested market does not exist"
}
/api/crypto/markets
Public
Create a new market
POST /api/crypto/markets
Content-Type: application/json
{
"pair": "BTC/USDT",
"base_currency": "BTC",
"quote_currency": "USDT",
"last_price": 43250.5,
"bid": 43248.300000000002910383045673370361328125,
"ask": 43252.699999999997089616954326629638671875,
"volume_24h": 15600,
"high_24h": 43890,
"low_24h": 42540
}
{
"pair": "BTC/USDT",
"base_currency": "BTC",
"quote_currency": "USDT",
"last_price": 43250.5,
"bid": 43248.300000000002910383045673370361328125,
"ask": 43252.699999999997089616954326629638671875,
"volume_24h": 15600,
"high_24h": 43890,
"low_24h": 42540
}
/api/crypto/markets/{id}
Public
Update an existing market
PUT /api/crypto/markets/1
Content-Type: application/json
{
"pair": "BTC/USDT",
"base_currency": "BTC",
"quote_currency": "USDT",
"last_price": 43250.5,
"bid": 43248.300000000002910383045673370361328125,
"ask": 43252.699999999997089616954326629638671875,
"volume_24h": 15600,
"high_24h": 43890,
"low_24h": 42540
}
{
"pair": "BTC/USDT",
"base_currency": "BTC",
"quote_currency": "USDT",
"last_price": 43250.5,
"bid": 43248.300000000002910383045673370361328125,
"ask": 43252.699999999997089616954326629638671875,
"volume_24h": 15600,
"high_24h": 43890,
"low_24h": 42540
}
/api/crypto/markets/{id}
Public
Delete a market by ID
DELETE /api/crypto/markets/1
Accept: application/json
{
"message": "Market deleted successfully"
}
{
"error": "Deletion failed",
"message": "Unable to delete the resource"
}
News
Cryptocurrency news and updates
/api/crypto/news
Public
Retrieve a paginated list of all news
GET /api/crypto/news
Accept: application/json
{
"data": [
{
"title": "Bitcoin Surges Past $43K Amid Institutional Buying",
"summary": "Bitcoin price jumps 3% as institutional investors increase their holdings...",
"url": "https://cryptonews.com/news/btc-surge",
"image": "https://picsum.photos/600/400?random=news1",
"source": "CryptoNews",
"related_cryptocurrencies": [
"BTC"
],
"published_at": "2024-01-22T08:30:00Z"
},
...
],
"meta": {
"current_page": 1,
"total": 50,
"per_page": 15
}
}
/api/crypto/news/{id}
Public
Retrieve a single new by ID
GET /api/crypto/news/1
Accept: application/json
{
"title": "Bitcoin Surges Past $43K Amid Institutional Buying",
"summary": "Bitcoin price jumps 3% as institutional investors increase their holdings...",
"url": "https://cryptonews.com/news/btc-surge",
"image": "https://picsum.photos/600/400?random=news1",
"source": "CryptoNews",
"related_cryptocurrencies": [
"BTC"
],
"published_at": "2024-01-22T08:30:00Z"
}
{
"error": "Resource not found",
"message": "The requested new does not exist"
}
/api/crypto/news
Public
Create a new new
POST /api/crypto/news
Content-Type: application/json
{
"title": "Bitcoin Surges Past $43K Amid Institutional Buying",
"summary": "Bitcoin price jumps 3% as institutional investors increase their holdings...",
"url": "https://cryptonews.com/news/btc-surge",
"image": "https://picsum.photos/600/400?random=news1",
"source": "CryptoNews",
"related_cryptocurrencies": [
"BTC"
],
"published_at": "2024-01-22T08:30:00Z"
}
{
"title": "Bitcoin Surges Past $43K Amid Institutional Buying",
"summary": "Bitcoin price jumps 3% as institutional investors increase their holdings...",
"url": "https://cryptonews.com/news/btc-surge",
"image": "https://picsum.photos/600/400?random=news1",
"source": "CryptoNews",
"related_cryptocurrencies": [
"BTC"
],
"published_at": "2024-01-22T08:30:00Z"
}
/api/crypto/news/{id}
Public
Update an existing new
PUT /api/crypto/news/1
Content-Type: application/json
{
"title": "Bitcoin Surges Past $43K Amid Institutional Buying",
"summary": "Bitcoin price jumps 3% as institutional investors increase their holdings...",
"url": "https://cryptonews.com/news/btc-surge",
"image": "https://picsum.photos/600/400?random=news1",
"source": "CryptoNews",
"related_cryptocurrencies": [
"BTC"
],
"published_at": "2024-01-22T08:30:00Z"
}
{
"title": "Bitcoin Surges Past $43K Amid Institutional Buying",
"summary": "Bitcoin price jumps 3% as institutional investors increase their holdings...",
"url": "https://cryptonews.com/news/btc-surge",
"image": "https://picsum.photos/600/400?random=news1",
"source": "CryptoNews",
"related_cryptocurrencies": [
"BTC"
],
"published_at": "2024-01-22T08:30:00Z"
}
/api/crypto/news/{id}
Public
Delete a new by ID
DELETE /api/crypto/news/1
Accept: application/json
{
"message": "New deleted successfully"
}
{
"error": "Deletion failed",
"message": "Unable to delete the resource"
}
Portfolios
User portfolio summary
/api/crypto/portfolios
Auth Required
User Filtering
Retrieve a paginated list of all portfolios
GET /api/crypto/portfolios
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
{
"data": [
{
"user_id": 1,
"user_name": "Robert Johnson",
"total_value_usd": 125670.5,
"total_invested_usd": 110000,
"profit_loss_usd": 15670.5,
"profit_loss_percentage": 14.25,
"holdings": [
{
"symbol": "BTC",
"amount": 2.45000000000000017763568394002504646778106689453125,
"value_usd": 105962.5
},
{
"symbol": "ETH",
"amount": 5.79999999999999982236431605997495353221893310546875,
"value_usd": 13605.350000000000363797880709171295166015625
}
]
},
...
],
"meta": {
"current_page": 1,
"total": 50,
"per_page": 15
}
}
/api/crypto/portfolios/{id}
Auth Required
Retrieve a single portfolio by ID
GET /api/crypto/portfolios/1
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
{
"user_id": 1,
"user_name": "Robert Johnson",
"total_value_usd": 125670.5,
"total_invested_usd": 110000,
"profit_loss_usd": 15670.5,
"profit_loss_percentage": 14.25,
"holdings": [
{
"symbol": "BTC",
"amount": 2.45000000000000017763568394002504646778106689453125,
"value_usd": 105962.5
},
{
"symbol": "ETH",
"amount": 5.79999999999999982236431605997495353221893310546875,
"value_usd": 13605.350000000000363797880709171295166015625
}
]
}
{
"error": "Resource not found",
"message": "The requested portfolio does not exist"
}
/api/crypto/portfolios
Auth Required
Auto User ID
Create a new portfolio
POST /api/crypto/portfolios
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json
{
"user_id": 1,
"user_name": "Robert Johnson",
"total_value_usd": 125670.5,
"total_invested_usd": 110000,
"profit_loss_usd": 15670.5,
"profit_loss_percentage": 14.25,
"holdings": [
{
"symbol": "BTC",
"amount": 2.45000000000000017763568394002504646778106689453125,
"value_usd": 105962.5
},
{
"symbol": "ETH",
"amount": 5.79999999999999982236431605997495353221893310546875,
"value_usd": 13605.350000000000363797880709171295166015625
}
]
}
{
"user_id": 1,
"user_name": "Robert Johnson",
"total_value_usd": 125670.5,
"total_invested_usd": 110000,
"profit_loss_usd": 15670.5,
"profit_loss_percentage": 14.25,
"holdings": [
{
"symbol": "BTC",
"amount": 2.45000000000000017763568394002504646778106689453125,
"value_usd": 105962.5
},
{
"symbol": "ETH",
"amount": 5.79999999999999982236431605997495353221893310546875,
"value_usd": 13605.350000000000363797880709171295166015625
}
]
}
/api/crypto/portfolios/{id}
Auth Required
Ownership Check
Update an existing portfolio
PUT /api/crypto/portfolios/1
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json
{
"user_id": 1,
"user_name": "Robert Johnson",
"total_value_usd": 125670.5,
"total_invested_usd": 110000,
"profit_loss_usd": 15670.5,
"profit_loss_percentage": 14.25,
"holdings": [
{
"symbol": "BTC",
"amount": 2.45000000000000017763568394002504646778106689453125,
"value_usd": 105962.5
},
{
"symbol": "ETH",
"amount": 5.79999999999999982236431605997495353221893310546875,
"value_usd": 13605.350000000000363797880709171295166015625
}
]
}
{
"user_id": 1,
"user_name": "Robert Johnson",
"total_value_usd": 125670.5,
"total_invested_usd": 110000,
"profit_loss_usd": 15670.5,
"profit_loss_percentage": 14.25,
"holdings": [
{
"symbol": "BTC",
"amount": 2.45000000000000017763568394002504646778106689453125,
"value_usd": 105962.5
},
{
"symbol": "ETH",
"amount": 5.79999999999999982236431605997495353221893310546875,
"value_usd": 13605.350000000000363797880709171295166015625
}
]
}
/api/crypto/portfolios/{id}
Auth Required
Ownership Check
Delete a portfolio by ID
DELETE /api/crypto/portfolios/1
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
{
"message": "Portfolio deleted successfully"
}
{
"error": "Deletion failed",
"message": "Unable to delete the resource"
}
Price-history
Historical price data
/api/crypto/price-history
Public
Retrieve a paginated list of all price-history
GET /api/crypto/price-history
Accept: application/json
{
"data": [
{
"cryptocurrency_symbol": "BTC",
"timestamp": "2024-01-20T00:00:00Z",
"price_usd": 42540,
"volume_24h": 27800000000,
"market_cap": 834000000000
},
...
],
"meta": {
"current_page": 1,
"total": 50,
"per_page": 15
}
}
/api/crypto/price-history/{id}
Public
Retrieve a single price-history by ID
GET /api/crypto/price-history/1
Accept: application/json
{
"cryptocurrency_symbol": "BTC",
"timestamp": "2024-01-20T00:00:00Z",
"price_usd": 42540,
"volume_24h": 27800000000,
"market_cap": 834000000000
}
{
"error": "Resource not found",
"message": "The requested price-history does not exist"
}
/api/crypto/price-history
Public
Create a new price-history
POST /api/crypto/price-history
Content-Type: application/json
{
"cryptocurrency_symbol": "BTC",
"timestamp": "2024-01-20T00:00:00Z",
"price_usd": 42540,
"volume_24h": 27800000000,
"market_cap": 834000000000
}
{
"cryptocurrency_symbol": "BTC",
"timestamp": "2024-01-20T00:00:00Z",
"price_usd": 42540,
"volume_24h": 27800000000,
"market_cap": 834000000000
}
/api/crypto/price-history/{id}
Public
Update an existing price-history
PUT /api/crypto/price-history/1
Content-Type: application/json
{
"cryptocurrency_symbol": "BTC",
"timestamp": "2024-01-20T00:00:00Z",
"price_usd": 42540,
"volume_24h": 27800000000,
"market_cap": 834000000000
}
{
"cryptocurrency_symbol": "BTC",
"timestamp": "2024-01-20T00:00:00Z",
"price_usd": 42540,
"volume_24h": 27800000000,
"market_cap": 834000000000
}
/api/crypto/price-history/{id}
Public
Delete a price-history by ID
DELETE /api/crypto/price-history/1
Accept: application/json
{
"message": "Price-history deleted successfully"
}
{
"error": "Deletion failed",
"message": "Unable to delete the resource"
}
Transactions
Buy, sell, and transfer transactions
/api/crypto/transactions
Auth Required
User Filtering
Retrieve a paginated list of all transactions
GET /api/crypto/transactions
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
{
"data": [
{
"transaction_hash": "0x3f4d2a1c8b5e9f6a3d2c1b4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4",
"user_id": 1,
"user_name": "Robert Johnson",
"type": "buy",
"cryptocurrency_symbol": "BTC",
"amount": 0.25,
"price_usd": 43100,
"total_usd": 10775,
"from_wallet": "USD Wallet",
"to_wallet": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
"status": "confirmed",
"created_at": "2024-01-20T10:30:00Z",
"confirmed_at": "2024-01-20T10:35:00Z"
},
...
],
"meta": {
"current_page": 1,
"total": 50,
"per_page": 15
}
}
/api/crypto/transactions/{id}
Auth Required
Retrieve a single transaction by ID
GET /api/crypto/transactions/1
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
{
"transaction_hash": "0x3f4d2a1c8b5e9f6a3d2c1b4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4",
"user_id": 1,
"user_name": "Robert Johnson",
"type": "buy",
"cryptocurrency_symbol": "BTC",
"amount": 0.25,
"price_usd": 43100,
"total_usd": 10775,
"from_wallet": "USD Wallet",
"to_wallet": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
"status": "confirmed",
"created_at": "2024-01-20T10:30:00Z",
"confirmed_at": "2024-01-20T10:35:00Z"
}
{
"error": "Resource not found",
"message": "The requested transaction does not exist"
}
/api/crypto/transactions
Auth Required
Auto User ID
Create a new transaction
POST /api/crypto/transactions
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json
{
"transaction_hash": "0x3f4d2a1c8b5e9f6a3d2c1b4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4",
"user_id": 1,
"user_name": "Robert Johnson",
"type": "buy",
"cryptocurrency_symbol": "BTC",
"amount": 0.25,
"price_usd": 43100,
"total_usd": 10775,
"from_wallet": "USD Wallet",
"to_wallet": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
"status": "confirmed",
"confirmed_at": "2024-01-20T10:35:00Z"
}
{
"transaction_hash": "0x3f4d2a1c8b5e9f6a3d2c1b4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4",
"user_id": 1,
"user_name": "Robert Johnson",
"type": "buy",
"cryptocurrency_symbol": "BTC",
"amount": 0.25,
"price_usd": 43100,
"total_usd": 10775,
"from_wallet": "USD Wallet",
"to_wallet": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
"status": "confirmed",
"created_at": "2024-01-20T10:30:00Z",
"confirmed_at": "2024-01-20T10:35:00Z"
}
/api/crypto/transactions/{id}
Auth Required
Ownership Check
Update an existing transaction
PUT /api/crypto/transactions/1
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json
{
"transaction_hash": "0x3f4d2a1c8b5e9f6a3d2c1b4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4",
"user_id": 1,
"user_name": "Robert Johnson",
"type": "buy",
"cryptocurrency_symbol": "BTC",
"amount": 0.25,
"price_usd": 43100,
"total_usd": 10775,
"from_wallet": "USD Wallet",
"to_wallet": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
"status": "confirmed",
"confirmed_at": "2024-01-20T10:35:00Z"
}
{
"transaction_hash": "0x3f4d2a1c8b5e9f6a3d2c1b4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4",
"user_id": 1,
"user_name": "Robert Johnson",
"type": "buy",
"cryptocurrency_symbol": "BTC",
"amount": 0.25,
"price_usd": 43100,
"total_usd": 10775,
"from_wallet": "USD Wallet",
"to_wallet": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
"status": "confirmed",
"created_at": "2024-01-20T10:30:00Z",
"confirmed_at": "2024-01-20T10:35:00Z"
}
/api/crypto/transactions/{id}
Auth Required
Ownership Check
Delete a transaction by ID
DELETE /api/crypto/transactions/1
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
{
"message": "Transaction deleted successfully"
}
{
"error": "Deletion failed",
"message": "Unable to delete the resource"
}
Users
Platform users
/api/crypto/users
Public
Retrieve a paginated list of all users
GET /api/crypto/users
Accept: application/json
{
"data": [
{
"name": "Robert Johnson",
"email": "robert@crypto.com",
"password": "$2y$12$j1O8T17Lx7IK529rKa0gS.g/cfriqUZylGT9SKKKZ9aAXMTHr828W",
"api_token": "466c251a43d04a3dd83c5464b55c259c621b525a643f7b84ccb47ea3b39243e0",
"avatar": "https://i.pravatar.cc/150?img=51",
"kyc_verified": true,
"joined_at": "2023-06-15",
"total_balance_usd": 125670.5,
"wallets_count": 5
},
...
],
"meta": {
"current_page": 1,
"total": 50,
"per_page": 15
}
}
/api/crypto/users/{id}
Public
Retrieve a single user by ID
GET /api/crypto/users/1
Accept: application/json
{
"name": "Robert Johnson",
"email": "robert@crypto.com",
"password": "$2y$12$j1O8T17Lx7IK529rKa0gS.g/cfriqUZylGT9SKKKZ9aAXMTHr828W",
"api_token": "466c251a43d04a3dd83c5464b55c259c621b525a643f7b84ccb47ea3b39243e0",
"avatar": "https://i.pravatar.cc/150?img=51",
"kyc_verified": true,
"joined_at": "2023-06-15",
"total_balance_usd": 125670.5,
"wallets_count": 5
}
{
"error": "Resource not found",
"message": "The requested user does not exist"
}
/api/crypto/users
Public
Create a new user
POST /api/crypto/users
Content-Type: application/json
{
"name": "Robert Johnson",
"email": "robert@crypto.com",
"password": "$2y$12$j1O8T17Lx7IK529rKa0gS.g/cfriqUZylGT9SKKKZ9aAXMTHr828W",
"api_token": "466c251a43d04a3dd83c5464b55c259c621b525a643f7b84ccb47ea3b39243e0",
"avatar": "https://i.pravatar.cc/150?img=51",
"kyc_verified": true,
"joined_at": "2023-06-15",
"total_balance_usd": 125670.5,
"wallets_count": 5
}
{
"name": "Robert Johnson",
"email": "robert@crypto.com",
"password": "$2y$12$j1O8T17Lx7IK529rKa0gS.g/cfriqUZylGT9SKKKZ9aAXMTHr828W",
"api_token": "466c251a43d04a3dd83c5464b55c259c621b525a643f7b84ccb47ea3b39243e0",
"avatar": "https://i.pravatar.cc/150?img=51",
"kyc_verified": true,
"joined_at": "2023-06-15",
"total_balance_usd": 125670.5,
"wallets_count": 5
}
/api/crypto/users/{id}
Auth Required
Ownership Check
Update an existing user
PUT /api/crypto/users/1
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json
{
"name": "Robert Johnson",
"email": "robert@crypto.com",
"password": "$2y$12$j1O8T17Lx7IK529rKa0gS.g/cfriqUZylGT9SKKKZ9aAXMTHr828W",
"api_token": "466c251a43d04a3dd83c5464b55c259c621b525a643f7b84ccb47ea3b39243e0",
"avatar": "https://i.pravatar.cc/150?img=51",
"kyc_verified": true,
"joined_at": "2023-06-15",
"total_balance_usd": 125670.5,
"wallets_count": 5
}
{
"name": "Robert Johnson",
"email": "robert@crypto.com",
"password": "$2y$12$j1O8T17Lx7IK529rKa0gS.g/cfriqUZylGT9SKKKZ9aAXMTHr828W",
"api_token": "466c251a43d04a3dd83c5464b55c259c621b525a643f7b84ccb47ea3b39243e0",
"avatar": "https://i.pravatar.cc/150?img=51",
"kyc_verified": true,
"joined_at": "2023-06-15",
"total_balance_usd": 125670.5,
"wallets_count": 5
}
/api/crypto/users/{id}
Auth Required
Ownership Check
Delete a user by ID
DELETE /api/crypto/users/1
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
{
"message": "User deleted successfully"
}
{
"error": "Deletion failed",
"message": "Unable to delete the resource"
}
Wallets
User cryptocurrency wallets
/api/crypto/wallets
Auth Required
User Filtering
Retrieve a paginated list of all wallets
GET /api/crypto/wallets
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
{
"data": [
{
"user_id": 1,
"user_name": "Robert Johnson",
"cryptocurrency_id": 1,
"cryptocurrency_symbol": "BTC",
"address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
"balance": 2.45000000000000017763568394002504646778106689453125,
"balance_usd": 105962.5,
"created_at": "2023-06-15T10:00:00Z"
},
...
],
"meta": {
"current_page": 1,
"total": 50,
"per_page": 15
}
}
/api/crypto/wallets/{id}
Auth Required
Retrieve a single wallet by ID
GET /api/crypto/wallets/1
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
{
"user_id": 1,
"user_name": "Robert Johnson",
"cryptocurrency_id": 1,
"cryptocurrency_symbol": "BTC",
"address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
"balance": 2.45000000000000017763568394002504646778106689453125,
"balance_usd": 105962.5,
"created_at": "2023-06-15T10:00:00Z"
}
{
"error": "Resource not found",
"message": "The requested wallet does not exist"
}
/api/crypto/wallets
Auth Required
Auto User ID
Create a new wallet
POST /api/crypto/wallets
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json
{
"user_id": 1,
"user_name": "Robert Johnson",
"cryptocurrency_id": 1,
"cryptocurrency_symbol": "BTC",
"address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
"balance": 2.45000000000000017763568394002504646778106689453125,
"balance_usd": 105962.5
}
{
"user_id": 1,
"user_name": "Robert Johnson",
"cryptocurrency_id": 1,
"cryptocurrency_symbol": "BTC",
"address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
"balance": 2.45000000000000017763568394002504646778106689453125,
"balance_usd": 105962.5,
"created_at": "2023-06-15T10:00:00Z"
}
/api/crypto/wallets/{id}
Auth Required
Ownership Check
Update an existing wallet
PUT /api/crypto/wallets/1
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json
{
"user_id": 1,
"user_name": "Robert Johnson",
"cryptocurrency_id": 1,
"cryptocurrency_symbol": "BTC",
"address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
"balance": 2.45000000000000017763568394002504646778106689453125,
"balance_usd": 105962.5
}
{
"user_id": 1,
"user_name": "Robert Johnson",
"cryptocurrency_id": 1,
"cryptocurrency_symbol": "BTC",
"address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
"balance": 2.45000000000000017763568394002504646778106689453125,
"balance_usd": 105962.5,
"created_at": "2023-06-15T10:00:00Z"
}
/api/crypto/wallets/{id}
Auth Required
Ownership Check
Delete a wallet by ID
DELETE /api/crypto/wallets/1
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
{
"message": "Wallet deleted successfully"
}
{
"error": "Deletion failed",
"message": "Unable to delete the resource"
}