======================== This document describes SpectroCoin wallet service API specification.
- Requirements
- API
- Introduction
- POST /oauth2/auth
- POST /oauth2/refresh
- POST /wallet/send/{currency}
- GET /wallet/deposit/{currency}/last
- GET /wallet/deposit/{currency}/fresh
- GET /wallet/exchange/calculate/buy
- GET /wallet/exchange/calculate/sell
- POST /wallet/exchange/buy
- POST /wallet/exchange/sell
- GET /wallet/accounts
- GET /wallet/account/{accountId}
- GET /send/status/{paymentId}
- Errors
- Example applications
- Must have a SpectroCoin account (Sign Up!) to setup wallet API.
- Must setup wallet API instance on SpectroCoin API configuration page.
Wallet API is REST based web service. Accept GET or POST (application/json) requests. Responses are application/json content type.
API authentication is performed using OAuth2 (/oauth2). Wallet functions is accessible through /wallet.
Root REST API address: https://spectrocoin.com/api/r/
Wallet API can return specific response object (HTTP 200), validation error (HTTP 203), suspicious activity error (HTTP 403) or internal error (HTTP 500).
SpectroCoin use two services:
- Authorization service
/oauth2- necessary for getting access to wallet api private service methods usage. - Wallet api service
/wallet- allows user to check account balances, spend, exchange currency together with other wallet related activities.
- To get access tokens (access and refresh tokens) you must call /oath2/auth REST method providing required fields.
- Response will contain token information (access_token, refresh_token, scope, expires_in..). Having access tokens you can build Authorization header value.
- All other REST methods within security scope must have extra HTTP header -
Authorization. Value should start with Bearer space and access tokenBearer 42e0f8d6cc2f30de2b1dad7cc2df5455b6d05308e6e06495c766dcb43853ba6d17b77b7623899625
These tokens have a finite lifetime and you must write code to detect when an access token expires. You can do this either by keeping track of the expires_in value returned in the response from the token request (the value is expressed in seconds), or handle the error response (1003) from the API endpoint when an expired token is detected. If access token is expired need to get new token by using refresh token. If refresh token is expired, then need to authenticate from the beginning.
The scope parameter is used to indicate a list of permissions that are requested by the client. List of scopes should be separated with space. Example: send_currency currency_exchange user_account.
Method to authenticate user and get access tokens to use wallet REST API. Refresh token is used to issue new access tokens when original access token expire.
| Field | Type | Required | Example |
|---|---|---|---|
| client_id | String | + | wallet_8f452af79dcb7fed5979d11cc33910bb |
| client_secret | String | + | test-secret |
| version | String | + | 1.0 |
| scope | String | + | send_currency currency_exchange user_account |
Example HTTP request:
POST https://spectrocoin.com/api/r/oauth2/auth
Connection: Keep-Alive
Content-Length: 137
Content-Type: application/json
Host: spectrocoin.com
{
"client_id": "wallet_8f452af79dcb7fed5979d11cc33910bb",
"client_secret": "test-secret",
"version": "1.0",
"scope": "user_account send_currency currency_exchange"
}
Possible validation error codes: 1, 1003, 2001
| Field | Type | Always return | Example |
|---|---|---|---|
| access_token | String | + | 42e0f8d6cc2f30d...2df5455b6d05308e6e064b99625 |
| expires_in | String | + | 300 (seconds) |
| refresh_token | String | + | 3cbba02103fb479...21923fe35038ccf4ebbc8fe6084 |
| scope | String | + | send_currency currency_exchange user_account |
| token_type | String | - | bearer |
JSON Response example:
{
"access_token": "42e0f8d6cc2f30de2b1dad7cc2df5455b6d05308e6e06495c766dcb43853ba6d17b77b7623899625",
"token_type": "bearer",
"expires_in": 300,
"refresh_token": "3cbba02103fb47991921923fe350da11299038ccf4ebbc866fc4b2615b46c013a3211509b0fe6084",
"scope": "send_currency currency_exchange user_account"
}Method to exchange user wallet REST API refresh token to new pair of oauth2 tokens.
| Field | Type | Required | Example |
|---|---|---|---|
| client_id | String | + | wallet_8f452af79dcb7fed5979d11cc33910bb |
| client_secret | String | + | test-secret |
| refresh_token | String | + | cfee255c08b61b08...1588a4de1fc75a89b529619 |
| version | String | + | 1.0 |
Example HTTP request:
POST https://spectrocoin.com/api/r/oauth2/refresh
Connection: Keep-Alive
Content-Length: 177
Content-Type: application/json
Host: spectrocoin.com
{
"client_id": "wallet_8f452af79dcb7fed5979d11cc33910bb",
"client_secret": "test-secret",
"version": "1.0",
"refresh_token": "cfee255c08b61b08…1588a4de1fc75a89b529619"
}Possible validation error codes: 1, 1003, 2001, 2003
| Field | Type | Always return | Example |
|---|---|---|---|
| access_token | String | + | f6f2e066917...3cd28756350041fd00c8ff741e0c1bf |
| expires_in | String | + | 300 (seconds) |
| refresh_token | String | + | f4a74245757...be20d23fc81cff0750613cd319abaf1 |
| scope | String | + | send_currency currency_exchange user_account |
| token_type | String | - | bearer |
JSON Response example:
{
"access_token": "f6f2e0669172035b98a241d6e2afdf531184a400ec8321e1f3cd28756350041fd00c8ff741e0c1bf",
"token_type": "bearer",
"expires_in": 300,
"refresh_token": "f4a742457578f5d0b029bf39776c8a6b45b43f7bf5e97514cbe20d23fc81cff0750613cd319abaf1",
"scope": "send_currency currency_exchange user_account"
}Validation example:
[{
"code": 2003,
"message": "Refresh token expired, please authenticate."
}]Operation to send currency to receiver (bitcoin address, dash address, email address). Additional fees may apply depending on send currency and receiver type. Receiver will receive provided amount and currency if sender has enough balance to cover possible additional fee, otherwise fee will be deducted from send amount. You can provide multiple Bitcoin addresses as receivers to include all payments into one transaction.
| Schema | Scope |
|---|---|
| OAuth2 | send_currency |
| Field | Type | Required | Example |
|---|---|---|---|
| currency | String | + | EUR, BTC, DASH, XEM |
| Field | Type | Required | Example |
|---|---|---|---|
| amount | Double | + | 13.19, 0.00145021 |
| receiver | String | + | test_cs7@spectrocoin.com, 12KKCFWLPayT8VAbhHRhs7VCS1LPUGGfqv |
| message | String | - | ip8RTyNs |
| refId | String | - | testRandomStringX$#@! |
This variable message is usable for XEM send.
This variable refId should be unique for each send.
Example HTTP request:
POST https://spectrocoin.com/api/r/wallet/send/BTC
Authorization: Bearer 42e0f8d6cc2f30de2b1dad7cc2df5455b6d05308e6e06495c766dcb43853ba6d17b77b7623899625
Connection: Keep-Alive
Content-Length: 47
Content-Type: application/json
Host: spectrocoin.com
[
{
"amount": 0.2,
"receiver": "12KKCFWLPayT8VAbhHRhs7VCS1LPUGGfqv"
}
]Example HTTP request send BTC with refId:
POST https://spectrocoin.com/api/r/wallet/send/BTC
Authorization: Bearer 42e0f8d6cc2f30de2b1dad7cc2df5455b6d05308e6e06495c766dcb43853ba6d17b77b7623899625
Connection: Keep-Alive
Content-Length: 47
Content-Type: application/json
Host: spectrocoin.com
[
{
"amount": 0.002,
"receiver": "12KKCFWLPayT8VAbhHRhs7VCS1LPUGGfqv",
"refId": "testRandomStringX$#@!"
}
]Example HTTP request send XEM:
POST https://spectrocoin.com/api/r/wallet/send/XEM
Authorization: Bearer 42e0f8d6cc2f30de2b1dad7cc2df5455b6d05308e6e06495c766dcb43853ba6d17b77b7623899625
Connection: Keep-Alive
Content-Length: 47
Content-Type: application/json
Host: spectrocoin.com
[
{
"amount": 2,
"receiver": "TAVISI7ETMVMS2C7CN6V2X6AUUGZQYVJ7GLZYP5O",
"message": "zZnXgCoN"
}
]Example for multiple BTC receivers:
POST https://spectrocoin.com/api/r/wallet/send/BTC
Authorization: Bearer 42e0f8d6cc2f30de2b1dad7cc2df5455b6d05308e6e06495c766dcb43853ba6d17b77b7623899625
Connection: Keep-Alive
Content-Length: 47
Content-Type: application/json
Host: spectrocoin.com
[
{
"amount": 0.2,
"receiver": "12KKCFWLPayT8VAbhHRhs7VCS1LPUGGfqv"
},
{
"amount": 0.3,
"receiver": "12KKCFWLPayT8VAbhHRhs7VCS1LPUGGfqv"
}
]Possible validation error codes: 1, 1001, 1003, 1004, 1005, 1008, 3001, 3002, 3003, 3005, 3006, 3016, 3017, 3032, 5003, 5021
| Field | Type | Always return | Example |
|---|---|---|---|
| paymentId | Long | + | 153 |
| withdrawAmount | Double | + | 13.19, 0.00145021 |
| receiveAmount | Double | + | 13.19, 0.00145021 |
| currency | String | + | EUR, BTC, USD... |
| status | String | - | Statuses: NEW, PENDING FAILED or PAID |
| receiver | String | + | test@spectrocoin.com, 12KKCFWLPayT8VAbhHRhs7VCS1LPUGGfqv |
| message | String | - | cGkSx732 |
| sendCurrencyData | SendCurrencyData | + | "sendCurrencyData":{...} |
This variable paymentId is obsolete.
This variable withdrawAmountis obsolete.
This variable receiveAmount is obsolete.
This variable currency is obsolete.
This variable status is obsolete.
This variable receiver is obsolete.
This variable message is obsolete.
SendCurrencyData
| Field | Type | Always return | Example |
|---|---|---|---|
| paymentId | Long | + | 153 |
| withdrawAmount | Double | + | 13.19, 0.00145021 |
| receiveAmount | Double | + | 13.19, 0.00145021 |
| currency | String | + | EUR, BTC, USD... |
| status | String | - | Statuses: NEW, PENDING FAILED or PAID |
| receiver | String | + | test@spectrocoin.com |
| message | String | - | cGkSx732 |
| refId | String | - | testRandomStringX$#@! |
| error | ErrorInfo | - | "error":{...} |
Variable message could be returned only if send was made to XEM address and message was specified.
ErrorInfo
| Field | Type | Always return | Example |
|---|---|---|---|
| code | short | + | 3005 |
| message | String | + | Sender and receiver should be different |
NEW– initial status, should be processed in near future or manuallyPENDING– money from sender account is charged and reserved for receiverPAID– receiver got moneyFAILED- send failed
JSON Response example:
{
"paymentId": "153",
"withdrawAmount": 13.19,
"receiveAmount": 13.19,
"currency": "EUR",
"status": "PAID",
"receiver": "test@spectrocoin.com",
"sendCurrencyData": {
"paymentId": "153",
"withdrawAmount": 13.19,
"receiveAmount": 13.19,
"currency": "EUR",
"status": "PAID",
"receiver": "test@spectrocoin.com"
}
}JSON Response example:
{
"paymentId": "159",
"withdrawAmount": 0.002,
"receiveAmount": 0.002,
"currency": "BTC",
"status": "PAID",
"receiver": "12KKCFWLPayT8VAbhHRhs7VCS1LPUGGfqv",
"sendCurrencyData": {
"paymentId": "153",
"withdrawAmount": 0.002,
"receiveAmount": 0.002,
"currency": "EUR",
"status": "PAID",
"refId": "testRandomStringX$#@!",
"receiver": "12KKCFWLPayT8VAbhHRhs7VCS1LPUGGfqv"
}
}Validation example:
[
{
"code": 3005,
"message": "Sender and receiver should be different"
},
]Response example bulk send with failed transaction:
{"sendCurrencyData": [
{
"paymentId": 205,
"withdrawAmount": 0.30000000,
"receiveAmount": 0.30000000,
"currency": "BTC",
"status": "PAID",
"receiver": "12KKCFWLPayT8VAbhHRhs7VCS1LPUGGfqv"
},
{
"paymentId": 206,
"withdrawAmount": 0.30000000,
"receiveAmount": 0.30000000,
"currency": "BTC",
"status": "PAID",
"receiver": "test@spectrocoin.com"
},
{
"withdrawAmount": 0.003,
"receiveAmount": 0.003,
"status": "FAILED",
"receiver": "wallet@spectrocoin.com",
"error":
{
"code": 3005,
"message": "Sender and receiver should be different"
},
}
]}Method to get a current Bitcoin address to receive funds (can also be used to get DASH, ETH, XEM address).
| Schema | Scope | |
|---|---|---|
| OAuth2 | user_account |
| Field | Type | Required | Example |
|---|---|---|---|
| currency | String | + | BTC, DASH, ETH, XEM |
Returns Bitcoin address (or DASH, ETH, XEM address).
Possible validation error codes: 1, 1003, 1004, 1012
| Field | Type | Always return | Example |
|---|---|---|---|
| btcAddress | String | - | 1M4bqMd471TTwNtUSeHPhSW5qQy1Y48p5b |
| cryptoAddress | String | + | 1M4bqMd471TTwNtUSeHPhSW5qQy1Y48p5b |
| currency | String | + | BTC |
| message | String | - | zZnXgCoN |
This variable btcAddress is obsolete.
This variable message is returned when getting XEM address.
-
Parameters
- currency: BTC - type currency name (BTC, DASH, ETH, XEM)
-
Example request get last BTC address:
GET https://spectrocoin.com/api/r/wallet/deposit/BTC/last Authorization: Bearer f6f2e0669172035b98a241d6e2afdf531184a400ec8321e1f3cd28756350041fd00c8ff741e0c1bf Connection: Keep-Alive
-
JSON Example response BTC address:
{ "cryptoAddress": "1M4bqMd471TTwNtUSeHPhSW5qQy1Y48p5b", "currency": "BTC" } -
Example response DASH address:
{ "cryptoAddress": "Xxbit2NkZ4YfAyrgWCSQtRzDjvPJyPFZ4n", "currency": "DASH" }
-
Example response XEM address:
{ "cryptoAddress": "TAVISI7ETMVMS2C7CN6V2X6AUUGZQYVJ7GLZYP5O", "currency": "XEM", "message": "zZnXgCoN" }
Method used to generate new Bitcoin addresses (can also be used to generate new DASH and XEM addresses).
| Schema | Scope | |
|---|---|---|
| OAuth2 | user_account |
| Field | Type | Required | Example |
|---|---|---|---|
| currency | String | + | BTC, DASH, XEM |
Return new Bitcoin address.
Possible validation error codes: 1, 1003, 1004, 1012
| Field | Type | Always return | Example |
|---|---|---|---|
| btcAddress | String | - | 1Bm3ENaZrtrExi56ywM6DWKQgJDmsrMQ41 |
| cryptoAddress | String | + | 1Bm3ENaZrtrExi56ywM6DWKQgJDmsrMQ41 |
| currency | String | + | BTC, DASH, XEM |
| message | String | - | zZnXgCoN |
This variable btcAddress is obsolete.
This variable message is returned when generating XEM address
-
Parameters
- currency: BTC - type currency name (BTC, DASH, XEM)
-
Example request generate XEM address:
GET https://spectrocoin.com/api/r/wallet/deposit/XEM/fresh Authorization: Bearer f6f2e0669172035b98a241d6e2afdf531184a400ec8321e1f3cd28756350041fd00c8ff741e0c1bf Connection: Keep-Alive
-
Example response BTC address:
{ "btcAddress": "19ewwHxeppY74bnT1wrT6kM1ymCWdJLkVG", "cryptoAddress": "19ewwHxeppY74bnT1wrT6kM1ymCWdJLkVG", "currency": "BTC" } -
Example response DASH address:
{ "cryptoAddress": "Xxbit2NkZ4YfAyrgWCSQtRzDjvPJyPFZ4n", "currency": "DASH" }
-
Example response XEM address:
{ "cryptoAddress": "Xxbit2NkZ4YfAyrgWCSQtRzDjvPJyPFZ4n", "currency": "XEM", "message": "zZnXgCoN" }
Operation used to calculate needed pay amount to receive required receive amount at the current moment.
| Schema | Scope |
|---|---|
| OAuth2 | currency_exchange |
| Field | Type | Required | Example |
|---|---|---|---|
| receiveAmount | Double | + | 0.00212015, 3.01 |
| receiveCurrency | String | + | BTC |
| payCurrency | String | + | EUR |
Example HTTP request:
GET https://spectrocoin.com/api/r/wallet/exchange/calculate/buy?receiveAmount=3.01&receiveCurrency=USD&payCurrency=EUR
Authorization: Bearer 42e0f8d6cc2f30de2b1dad7cc2df5455b6d05308e6e06495c766dcb43853ba6d17b77b7623899625
Connection: Keep-Alive
Host: spectrocoin.comPossible validation error codes: 1, 1003, 1004, 1005, 7008
| Field | Type | Always return | Example |
|---|---|---|---|
| payAmount | Double | + | 2.35 |
| payCurrency | String | + | EUR |
JSON Response example:
{
"payAmount": 2.35,
"payCurrency": "EUR"
}Operation used to calculate receive amount of currency exchange using pay amount at the current moment.
| Schema | Scope |
|---|---|
| OAuth2 | currency_exchange |
| Field | Type | Required | Example |
|---|---|---|---|
| payAmount | Double | + | 10.15, 14.80219015 |
| receiveCurrency | String | + | BTC |
| payCurrency | String | + | EUR |
Example HTTP request:
GET https://spectrocoin.com/api/r/wallet/exchange/calculate/sell?payAmount=10.15&payCurrency=EUR&receiveCurrency=BTC
Authorization: Bearer 42e0f8d6cc2f30de2b1dad7cc2df5455b6d05308e6e06495c766dcb43853ba6d17b77b7623899625
Connection: Keep-Alive
Host: spectrocoin.comPossible validation error codes: 1, 1003, 1004, 1005, 7008
| Field | Type | Always return | Example |
|---|---|---|---|
| receiveAmount | Double | + | 19.23, 0.0001257 |
| receiveCurrency | String | + | EUR |
JSON Response example:
{
"receiveAmount": 0.04610103,
"receiveCurrency": "BTC"
}Operation used to buy requested amount of receive currency while paying with pay currency.
| Schema | Scope |
|---|---|
| OAuth2 | currency_exchange |
| Field | Type | Required | Example |
|---|---|---|---|
| receiveAmount | Double | + | 3.01, 0.04610103 |
| receiveCurrency | String | + | USD |
| payCurrency | String | + | EUR |
Example HTTP request:
POST https://spectrocoin.com/api/r/wallet/exchange/buy
Authorization: Bearer 42e0f8d6cc2f30de2b1dad7cc2df5455b6d05308e6e06495c766dcb43853ba6d17b77b7623899625
Connection: Keep-Alive
Content-Length: 54
Content-Type: application/json
Host: spectrocoin.com
{
"receiveAmount": 3.01,
"receiveCurrency": "USD",
"payCurrency": "EUR"
}
Possible validation error codes: 1, 1001, 1002, 1003, 1004, 1005, 7006, 7007, 7008, 7009, 7010
| Field | Type | Always return | Example |
|---|---|---|---|
| exchangeId | Long | + | 50 |
| payAmount | Double | + | 2.35, 0.046101 |
| payCurrency | String | + | EUR |
| receiveAmount | Double | + | 19.23, 0.0001257 |
| receiveCurrency | String | + | USD |
| status | String | - | Statuses: NEW, PENDING or PAID |
NEW– initial statusPENDING– waiting for approvalPAID– exchange completed
JSON Response example:
{
"exchangeId": 50,
"status": "PAID",
"payAmount": 2.35,
"payCurrency": "EUR",
"receiveCurrency": "USD",
"receiveAmount": 3.01
}Operation used to exchange pay currency amount to receive currency.
| Schema | Scope |
|---|---|
| OAuth2 | currency_exchange |
| Field | Type | Required | Example |
|---|---|---|---|
| payAmount | Double | + | 1.15, 2.35040101 |
| receiveCurrency | String | + | EUR |
| payCurrency | String | + | BTC |
Example HTTP request:
POST https://spectrocoin.com/api/r/wallet/exchange/sell
Authorization: Bearer 42e0f8d6cc2f30de2b1dad7cc2df5455b6d05308e6e06495c766dcb43853ba6d17b77b7623899625
Connection: Keep-Alive
Content-Length: 50
Content-Type: application/json
Host: spectrocoin.com
{
"payAmount": 1.15,
"receiveCurrency": "BTC",
"payCurrency": "EUR"
}
Possible validation error codes: 1, 1001, 1002, 1003, 1004, 1005, 7006, 7007, 7008, 7009, 7010
| Field | Type | Always return | Example |
|---|---|---|---|
| exchangeId | Long | + | 51 |
| payAmount | Double | + | 1.15 |
| payCurrency | String | + | EUR |
| receiveAmount | Double | + | 0.00522326 |
| receiveCurrency | String | + | BTC |
| status | String | + | Statuses: NEW, PENDING or PAID |
NEW– initial statusPENDING– waiting for approvalPAID– exchange completed
JSON Response example:
{
"exchangeId": 51,
"status": "PAID",
"payAmount": 1.15,
"payCurrency": "EUR",
"receiveCurrency": "BTC",
"receiveAmount": 0.00522326
}Operation used to get user accounts information.
| Schema | Scope |
|---|---|
| OAuth2 | user_account |
Example HTTP request:
GET https://spectrocoin.com/api/r/wallet/accounts
Authorization: Bearer f6f2e0669172035b98a241d6e2afdf531184a400ec8321e1f3cd28756350041fd00c8ff741e0c1bf
Connection: Keep-Alive
Host: spectrocoin.comResponse is an array of accounts. Account structure is defined bellow.
Possible validation error codes: 1, 1003, 1004
| Field | Type | Always return | Example |
|---|---|---|---|
| accountId | Long | + | 2626 |
| balance | Double | + | 351.76 |
| availableBalance | Double | + | 351.76 |
| reservedAmount | Double | - | 0 |
| currencyName | String | + | Euro |
| currencyCode | String | + | EUR |
| currencySymbol | String | - | € |
JSON Response example:
{"accounts": [
{
"accountId": 1505,
"balance": 1677.11,
"currencyName": "EURO",
"currencyCode": "EUR",
"availableBalance": 1677.11,
"reservedAmount": 0
},
{
"accountId": 2625,
"balance": 104.49,
"currencyName": "GBP",
"currencyCode": "GBP",
"availableBalance": 104.49,
"reservedAmount": 0
},
{
"accountId": 2503,
"balance": 25.76161379,
"currencyName": "Bitcoin",
"currencyCode": "BTC",
"availableBalance": 17.76161379,
"reservedAmount": 18
},
{
"accountId": 2583,
"balance": 627.51,
"currencyName": "USD",
"currencyCode": "USD",
"availableBalance": 627.51,
"reservedAmount": 0
}
]}Operation used to get paged transaction history of user account.
| Schema | Scope | |
|---|---|---|
| OAuth2 | user_account |
| Field | Type | Always return | Example |
|---|---|---|---|
| accountId | Long | + | 2626 |
| Field | Type | Always return | Example |
|---|---|---|---|
| page | Integer | + | 1 |
| size | Integer | + | 4 |
Example HTTP request:
GET https://spectrocoin.com/api/r/wallet/account/1505?page=1&size=4
Authorization: Bearer f6f2e0669172035b98a241d6e2afdf531184a400ec8321e1f3cd28756350041fd00c8ff741e0c1bf
Connection: Keep-Alive
Host: spectrocoin.comResponse is an array of transaction info and total transactions count. Historical data is returned in descending order. If user don’t define page and size in request by default we return first 25 records. History structure is defined bellow.
Possible validation error codes: 1, 1003, 1004, 6001
| Field | Type | Always return | Example |
|---|---|---|---|
| totalCount | Long | + | 425 |
| history | Array of History structure | - |
| Field | Type | Always return | Example |
|---|---|---|---|
| transactionId | String | + | SC000004848 |
| amount | Double | + | -1.15 |
| description | String | + | EUR sell for exchange. 1.15 EUR |
| date | Date | + | 2016-03-10T14:27:31.000Z |
| status | String | + | Statuses: PENDING, PROCESSED or FAILED |
PENDING– waiting for actionPROCESSED– transaction completedFAILED– transaction incomplete for some reason
JSON Response example:
{
"totalCount": 425,
"history":
[
{
"transactionNo": "SC000004848",
"status": "PROCESSED",
"amount": -1.15,
"description": "EUR sell for exchange. 1.15 EUR",
"date": "2016-03-10T14:27:31.000Z"
},
{
"transactionNo": "SC000004846",
"status": "PROCESSED",
"amount": -2.35,
"description": "EUR sell for exchange. 2.35 EUR",
"date": "2016-03-10T14:18:12.000Z"
},
{
"transactionNo": "SC000004841",
"status": "PROCESSED",
"amount": -13.19,
"description": "EUR sell for exchange. 13.19 EUR",
"date": "2016-03-10T14:12:40.000Z"
},
{
"transactionNo": "SC000004776",
"status": "PROCESSED",
"amount": -1.01,
"description": "EUR sell for exchange. 1.01 EUR",
"date": "2016-03-09T14:39:13.000Z"
}
]}Operation used to check your crypto send status
| Schema | Scope | |
|---|---|---|
| OAuth2 | user_account |
| Field | Type | Required | Example |
|---|---|---|---|
| paymentId | Long | + | 123 |
Example HTTP request:
GET https://spectrocoin.com/api/r/wallet/send/status/123
Authorization: Bearer f6f2e0669172035b98a241d6e2afdf531184a400ec8321e1f3cd28756350041fd00c8ff741e0c1bf
Connection: Keep-Alive
Host: spectrocoin.comReturn crypto payment info
Possible validation error codes: 1, 1003, 1004, 3030, 3031
| Field | Type | Always return | Example |
|---|---|---|---|
| paymentId | Long | + | 123 |
| status | String | + | Paid |
| transactionId | Long | + | 1469 |
| withdrawAmount | Double | + | 0.02 |
| receiver | String | + | TAVISI7ETMVMS2C7CN6V2X6AUUGZQYVJ7GLZYP5O |
| message | String | - | cGkSx732 |
| refId | String | - | testRandomStringX$#@! |
| receiveAmount | Double | + | 0.02 |
| currency | String | + | XEM, ETH, BTC |
JSON Response Example:
{
"paymentId": 188,
"status": "PAID",
"transactionId": "1469",
"withdrawAmount": 0.02,
"receiver": "TAVISI7ETMVMS2C7CN6V2X6AUUGZQYVJ7GLZYP5O",
"message": "cGkSx732",
"refId": "testRandomStringX$#@!",
"receiveAmount": 0.02,
"currency": "XEM"
}Invalid request or internal errors will result HTTP response with code 500.
Validation errors will result HTTP response with code 203. Response is an array of error information:
| Field | Type | Required | Example |
|---|---|---|---|
| code | Short | + | 1 |
| message | String | + | Unable to sell Bitcoin |
JSON Response example:
[
{
"code":1005,
"message":"Unknown value: BTR"
}
]Current available error codes:
There are several sample SpectroCoin wallet API client applications. You should customize them for your needs.
Sample SpectroCoin Wallet Java application could be found here.
Sample PHP application coming soon.

