The alanphelan/cryptocurrency-daily-rates-usd v1.0.0 API is organized around multiple Web Services and protocols (REST, SOAP etc.). Allowing you to speed up the implementation by choosing the technology you are most familiar with and the one that best suits your needs.
You can use the alanphelan/cryptocurrency-daily-rates-usd API in test mode, which does not affect your request limits. The API key you use to authenticate the request determines whether it is live mode or test mode.
We put a lot of time and effor for the API's to be backward compatible but with new features available this may not be possible. If you wish we can notify you when the new version of the API is released.
https://assetsapi.com/alanphelan/cryptocurrency-daily-rates-usd/v1.0.0/soap/wsdl
https://assetsapi.com/alanphelan/cryptocurrency-daily-rates-usd/v1.1.0/soap/call
Choose the language you're going to use to implement the API. Examples will be adjusted accordingly.
The alanphelan/cryptocurrency-daily-rates-usd API uses API keys to authenticate requests. You can view and manage your API keys in the API Keys section.
Test mode secret keys have the prefix test_
and live mode secret keys have the prefix live_
.
Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.
All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.
Add the following dependency to your pom.xml file:
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web-services</artifactId> <exclusions> <exclusion> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> </exclusion> </exclusions> </dependency>
The following listing shows the profile you need to add in Maven if you want it to work with Java 11:
<profiles> <profile> <id>java11</id> <activation> <jdk>[11,)</jdk> </activation> <dependencies> <dependency> <groupId>org.glassfish.jaxb</groupId> <artifactId>jaxb-runtime</artifactId> </dependency> </dependencies> </profile> </profiles>
Add this to your 'plugins' section:
<plugin> <groupId>org.jvnet.jaxb2.maven2</groupId> <artifactId>maven-jaxb2-plugin</artifactId> <version>0.14.0</version> <executions> <execution> <goals> <goal>generate</goal> </goals> </execution> </executions> <configuration> <schemaLanguage>WSDL</schemaLanguage> <generatePackage>com.example.consumingwebservice.wsdl</generatePackage> <schemas> <schema> <url>http://localhost:8080/ws/countries.wsdl</url> </schema> </schemas> </configuration> </plugin>
# | Message | Description |
---|---|---|
200 | OK | Everything worked as expected. |
400 | Bad Request | The request was unacceptable, often due to missing a required parameter. |
401 | Unauthorized | No valid API key provided. |
402 | Request Failed | The parameters were valid but the request failed. |
403 | Forbidden | The API key doesn't have permissions to perform the request. |
404 | Not Found | The requested asset doesn't exist. |
409 | Conflict | The request conflicts with another request (perhaps due to using the same idempotent key). |
422 | Results Limit Reached | You have reached or will soon reach your results limit. |
429 | Too Many Requests | Too many requests hit the API too quickly. We recommend an exponential backoff of your requests. |
500, 502, 503, 504 | Server Errors | Something went wrong on the server end. Those are logged and promptly fixed. |
List of crypto rates for a specific day
Attributes |
Example | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
integer | id | 149 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Unique ID | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
string | currency_code | BTC | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
crypto currency code | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
dateTime | date | 2021-10-31 00:00:00 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
decimal | volume_currency | 2418.97601850 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
number of lots traded in a crypto currency | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
decimal | volume_usd | 148355799.21460500 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
number of lots traded in a USD | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
decimal | low | 60005.00000000 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
lowest cryptocurrency rate for a specific day | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
decimal | high | 62415.00000000 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
highest cryptocurrency rate for a specific day | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
decimal | open | 61879.00000000 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
opening cryptocurrency rate for a specific day | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
decimal | close | 61330.00000000 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
closing cryptocurrency rate for a specific day | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
timestamp | created_at | 2022-03-28 12:53:10 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Record create time | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
timestamp | updated_at | 2022-03-28 12:53:10 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Record update time |
$assetsAPISoap = new \SoapClient(ALANPHELAN_CRYPTOCURRENCY_DAILY_RATES_USD_WSDL, [
'login' => ALANPHELAN_CRYPTOCURRENCY_DAILY_RATES_USD_SECRET,
'cache_wsdl' => WSDL_CACHE_NONE,
'soap_version' => SOAP_1_2,
'features' => SOAP_SINGLE_ELEMENT_ARRAYS
]);
$requestObj = (object)[
'options' => (object)[
]
];
try {
$responseObj = $assetsAPISoap->getCryptoCurrencyUsdRates($requestObj);
} catch (\SoapFault $fault) {
trigger_error("SOAP Fault: (code: {$fault->faultcode}" .
", msg: {$fault->faultstring})", E_USER_ERROR);
}
{ "success": true, pagination: {...},
"data": [
{
"id": "1",
"currency_code": "Quia voluptate deleniti adipisci voluptatem",
"date": "2024-12-21 12:57:38",
"volume_currency": "(decimal) - random value",
"volume_usd": "(decimal) - random value",
"low": "(decimal) - random value",
"high": "(decimal) - random value",
"open": "(decimal) - random value",
"close": "(decimal) - random value",
"created_at": "2024-12-21 12:57:38",
"updated_at": "2024-12-21 12:57:38"
}, ...
]
}