The base URL for all API requests is:
https://api.bitpulse.io
To access the API, you must include an API Key in the request header. The API uses a custom header for authentication. This ensures secure and controlled access to the endpoints.
Header Name | Description | Required | Example Value |
---|---|---|---|
Content-Type |
Specifies the media type of the request body. | Yes | application/json |
x-api-key |
Contains the API Key required for authentication. | Yes | <your_api_key> |
Python Code Snippet
import requests
import json
uri = "<https://api.bitpulse.io>"
endpoint = "/loan_risk"
rq = {
'type': 'GBM',
'params': {
'collateral_weights': {'PEPE': 1.0},
'loan_weights': {'USDC': 1.0},
'volatility_shock': 2.0,
'N': 1.5,
'M': 1.4,
'L': 1.3,
'R': 1.35,
'model_lookback': 90.0,
'loan_duration': 30.0,
'mc_top_up': 24.0,
'loan_value': 1000,
'mc_iter': 1000
}
}
x = requests.post(
uri + endpoint,
data = json.dumps(rq),
headers = {
"Content-type": "application/json",
"x-api-key": "<your_api_key>",
}
)
print(x.text)
[POST]
Loan Risk[POST]
Loan Origination[POST]
VaRThis API uses the following error codes:
400 Bad Request
: The request was malformed or missing required parameters. (In progress).401 Unauthorized
: The API key provided was invalid or missing.