Prime API: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 1: | Line 1: | ||
Prime API is based on JSON, delivered through HTTPS and is mostly REST-ful. | Prime API is based on JSON, delivered through HTTPS and is mostly REST-ful. | ||
API URIs always start with a marker "/v1" to make the version explicit. | |||
All timestamps are returned in ISO 8601 format: | |||
YYYY-MM-DDTHH:MM:SSZ | |||
==Public API== | ==Public API== | ||
Line 16: | Line 22: | ||
GET /v1/ | GET /v1/prv/deposit_address/:currency_name.json | ||
Example: | |||
<source lang="bash"> | <source lang="bash"> | ||
curl -v --request GET http://localhost:3000/v1/ | curl -v --request GET http://localhost:3000/v1/prv/deposit_address/BTC.json --header "Authorization: PrimeExchange 84ffsOscok1Asbbqj28gcscv86M3nj4bRIamFaKe" | ||
</source> | |||
Response: | |||
<source lang="javascript"> | |||
{"address":"n2Ccn5em9gcQyBe2QvZnfzzXq8EZh1ncJj"} | |||
</source> | </source> | ||
{" | Error response: | ||
<source lang="javascript"> | |||
{"errors":{"currency_name":"is invalid"}} | |||
</source> |
Revision as of 21:36, 7 February 2014
Prime API is based on JSON, delivered through HTTPS and is mostly REST-ful.
API URIs always start with a marker "/v1" to make the version explicit.
All timestamps are returned in ISO 8601 format:
YYYY-MM-DDTHH:MM:SSZ
Public API
Public API calls are available without authentication.
Private API
Private API calls require authentication via:
- Your personal API key and optionally
- IP address
Private API is off by default. You need to enable it in your profile.
Get my deposit address
GET /v1/prv/deposit_address/:currency_name.json
Example:
curl -v --request GET http://localhost:3000/v1/prv/deposit_address/BTC.json --header "Authorization: PrimeExchange 84ffsOscok1Asbbqj28gcscv86M3nj4bRIamFaKe"
Response:
{"address":"n2Ccn5em9gcQyBe2QvZnfzzXq8EZh1ncJj"}
Error response:
{"errors":{"currency_name":"is invalid"}}