# README
HTTP GraphQL API Endpoints
The GraphQL API schema can be tested and reviewed through the GraphQL Playground that is exposed when the server is started.
Table of contents
- Authorization Response
- Authorization
- Healthcheck Query
- User Mutations
- Fiat Account Mutations and Queries
- Crypto Account Mutations and Queries
Authorization Response
Authorization is implemented using JSON Web Tokens. An expiration deadline for the JWT is returned in response. It is the client's responsibility to refresh the token before, but no sooner than 60 seconds, before the deadline.
The returned token schema is below.
{
"expires": "expiration time integer in seconds, Unix time stamp",
"token": "token string",
"threshold": "threshold in integer seconds before expiration when the token can be refreshed"
}
Authorization
A valid JSON Web Token must be included in the header in the HTTP request for all endpoints that require authorization.
The Authorization
header key is customizable through the GraphQL endpoint configurations.
The following queries
and mutations
do not require authorization:
- Register User:
registerUser
- Login User:
loginUser
- Healthcheck:
healthcheck
{
"Authorization":
"JSON Web Token goes here"
}
Healthcheck Query
The health check endpoint is exposed to facilitate liveness checks on the service. The check will verify whether the service is connected to all the ancillary services and responds appropriately.
This check is essential for load balancers and container orchestrators to determine whether to route traffic or restart the container.
query {
healthcheck
}
Healthy Response:
{
"data": {
"healthcheck": "healthy"
}
}
Unhealthy Response:
{
"errors": [
{
"message": "[Postgres|Redis] healthcheck failed",
"path": [
"healthcheck"
]
}
],
"data": null
}
User Mutations
Register
Request: All fields are required.
mutation {
registerUser(input: {
firstname: "first name"
lastname: "last name"
email: "[email protected]",
userLoginCredentials: {
username: "someusername",
password: "somepassword"
}
}) {
token,
expires,
threshold
}
}
Response: A valid JWT will be returned as an authorization response.
Login
Request: All fields are required.
mutation {
loginUser(input: {
username: "someusername",
password: "somepassword"
}) {
token,
expires,
threshold
}
}
Response: A valid JWT will be returned as an authorization response.
Refresh
Request: A valid JWT must be provided in the request header and will be validated with a fresh token issued against it.
mutation {
refreshToken {
token
expires
threshold
}
}
Response: A valid JWT will be returned as an authorization response.
Delete
Request: All fields are required and a valid JWT must be provided in the header. The user must supply their login
credentials as well as complete the confirmation message I understand the consequences, delete my user account **USERNAME HERE**
mutation {
deleteUser(input: {
username: "someusername"
password: "somepassword"
confirmation: "I understand the consequences, delete my user account <USERNAME HERE>"
})
}
Response: A confirmation message will be returned as a success response.
Fiat Account Mutations and Queries
Open Account
Request: All fields are required.
mutation {
openFiat(currency: "USD") {
clientID,
currency
}
}
Response: Confirmation information containing the Client ID
and Currency
of the newly opened account.
{
"data": {
"openFiat": {
"clientID": "70a0caf3-3fb2-4a96-b6e8-991252a88efe",
"currency": "USD"
}
}
}
Deposit
Deposit money into a Fiat account for a specific currency and amount. An account for the currency must already be opened for the deposit to succeed.
Request: All fields are required.
mutation {
depositFiat(input: {
amount: 1345.67,
currency: "USD"
}) {
txId,
clientId,
txTimestamp,
balance,
lastTx,
currency
}
}
Response: A confirmation of the transaction with the particulars of the transfer.
{
"data": {
"depositFiat": {
"txId": "8522591d-6463-4cc6-9e3c-c456c98a6755",
"clientId": "70a0caf3-3fb2-4a96-b6e8-991252a88efe",
"txTimestamp": "2023-05-14 11:57:47.796057 -0400 EDT",
"balance": "14170.02",
"lastTx": "1345.67",
"currency": "USD"
}
}
}
Exchange
To convert between Fiat currencies, the user must maintain open accounts in both the source and destination Fiat currencies. The amount specified will be in the source currency and the amount to deposit into the destination account will be calculated based on the exchange rate.
The workflow will involve getting a conversion rate quote, referred to as an Offer
. The returned rate quote Offer
will
only be valid for a two-minute time window. The expiration time will be returned to the user as a Unix timestamp. The user
must issue a subsequent request using the encrypted Offer ID
to complete the transaction.
Quote
Request: All fields are required.
mutation {
exchangeOfferFiat(input: {
sourceCurrency: "USD"
destinationCurrency: "CAD"
sourceAmount: 100.11
}) {
priceQuote{
clientID,
sourceAcc,
destinationAcc,
rate,
amount
},
debitAmount,
offerID,
expires
}
}
Response: A rate quote with an encrypted Offer ID
.
{
"data": {
"exchangeOfferFiat": {
"priceQuote": {
"clientID": "70a0caf3-3fb2-4a96-b6e8-991252a88efe",
"sourceAcc": "USD",
"destinationAcc": "CAD",
"rate": 1.355365,
"amount": 135.69
},
"debitAmount": 100.11,
"offerID": "ME0pUhmOJRescxQx7IhJYrgIxeSJ-P4dABP2QVFbr5FGlu-yI_4GoGJ0oW23KTGf",
"expires": 1684116836
}
}
}
Convert
Request: All fields are required.
mutation {
exchangeTransferFiat(offerID: "-ptOjSHs3cw3eTw_1NuInn4w8OvI8hzFzChol7NRpKIHMDL234B_E1Fcq5Z6Zl4K") {
sourceReceipt {
txId,
clientId,
txTimestamp,
balance,
lastTx,
currency
},
destinationReceipt {
txId,
clientId,
txTimestamp,
balance,
lastTx,
currency
}
}
}
Response: A transaction receipt with the details of the source and destination accounts and transaction details.
{
"data": {
"exchangeTransferFiat": {
"sourceReceipt": {
"txId": "043d82a9-113b-4aa7-a3e1-029cc4728926",
"clientId": "70a0caf3-3fb2-4a96-b6e8-991252a88efe",
"txTimestamp": "2023-05-15 16:59:24.243332 -0400 EDT",
"balance": "13569.36",
"lastTx": "-100.11",
"currency": "USD"
},
"destinationReceipt": {
"txId": "043d82a9-113b-4aa7-a3e1-029cc4728926",
"clientId": "70a0caf3-3fb2-4a96-b6e8-991252a88efe",
"txTimestamp": "2023-05-15 16:59:24.243332 -0400 EDT",
"balance": "369283.5",
"lastTx": "134.75",
"currency": "CAD"
}
}
}
}
Info
Balance for a Specific Currency
Request: A valid currency code must be provided as a parameter.
query {
balanceFiat(currencyCode: "USD") {
currency,
balance,
lastTx,
lastTxTs,
createdAt,
clientID
}
}
Response: Account balance related details associated with the currency.
{
"data": {
"balanceFiat": {
"currency": "USD",
"balance": 13569.36,
"lastTx": -100.11,
"lastTxTs": "2023-05-15 14:59:24.243332 -0400 EDT",
"createdAt": "2023-05-09 18:29:04.345387 -0400 EDT",
"clientID": "70a0caf3-3fb2-4a96-b6e8-991252a88efe"
}
}
}
Balance for all Currencies for a Client
Request: The initial request can only contain an optional page size
, which if not provided will default to 10. The
subsequent responses will contain encrypted page cursors that must be specified to retrieve the following page of data.
Initial request: The pageCursor
will not be provided and the pageSize
is optional and will default to 10.
query {
balanceAllFiat(pageSize: 3) {
accountBalances{
currency
balance
lastTx
lastTxTs
createdAt
clientID
}
links{
pageCursor
}
}
}
Subsequent requests: The pageCursor
must be provided but the pageSize
is optional.
query {
balanceAllFiat(pageCursor: "G4dGbYhcNY8ByNNpdgYJq-jK1eRXHD7lBp56-IeiAQ==", pageSize: 3) {
accountBalances{
currency
balance
lastTx
lastTxTs
createdAt
clientID
}
links{
pageCursor
}
}
}
Response: The number of account balances for the Client will be limited to the Page Size
specified and is 10
by
default. A Page Cursor
link will be supplied if there are subsequent pages of data to be retrieved in the
links.pageCursor
JSON field.
{
"data": {
"balanceAllFiat": {
"accountBalances": [
{
"currency": "AED",
"balance": 30903.7,
"lastTx": -10000,
"lastTxTs": "2023-05-09 18:33:55.453689 -0400 EDT",
"createdAt": "2023-05-09 18:29:16.74704 -0400 EDT",
"clientID": "70a0caf3-3fb2-4a96-b6e8-991252a88efe"
},
{
"currency": "CAD",
"balance": 369283.5,
"lastTx": 134.75,
"lastTxTs": "2023-05-15 16:59:24.243332 -0400 EDT",
"createdAt": "2023-05-09 18:29:08.746285 -0400 EDT",
"clientID": "70a0caf3-3fb2-4a96-b6e8-991252a88efe"
},
{
"currency": "EUR",
"balance": 1536.45,
"lastTx": 1536.45,
"lastTxTs": "2023-05-09 18:31:32.213239 -0400 EDT",
"createdAt": "2023-05-09 18:29:21.365991 -0400 EDT",
"clientID": "70a0caf3-3fb2-4a96-b6e8-991252a88efe"
}
],
"links": {
"pageCursor": "iaguqIObr8FvtimV4k1uHJtZ2DHGPgTxNZVmsyEKKA=="
}
}
}
}
{
"data": {
"balanceAllFiat": {
"accountBalances": [
{
"currency": "USD",
"balance": 13569.36,
"lastTx": -100.11,
"lastTxTs": "2023-05-15 16:59:24.243332 -0400 EDT",
"createdAt": "2023-05-09 18:29:04.345387 -0400 EDT",
"clientID": "70a0caf3-3fb2-4a96-b6e8-991252a88efe"
}
],
"links": {
"pageCursor": ""
}
}
}
}
Transaction Details for a Specific Transaction
Request: A valid Transaction ID
must be provided as a parameter.
query {
transactionDetailsFiat(transactionID: "7d2fe42b-df1e-449f-875e-e9908ff24263")
}
Response: Transaction-related details for a specific transaction. In the event of an external deposit, there will be a single entry reporting the deposited amount. When querying for an internal transfer, two entries will be returned - one for the source and the other for the destination accounts.
External Transfer (deposit)
{
"data": {
"transactionFiat": [
{
"currency": "CAD",
"amount": 368474.77,
"transactedAt": "2023-05-09 18:30:51.985719 -0400 EDT",
"clientID": "70a0caf3-3fb2-4a96-b6e8-991252a88efe",
"txID": "7d2fe42b-df1e-449f-875e-e9908ff24263"
}
]
}
}
Internal Transfer (currency conversion/exchange)
{
"data": {
"transactionDetailsFiat": [
{
"currency": "AED",
"amount": 10000,
"transactedAt": "2023-05-09 18:33:55.453689 -0400 EDT",
"clientID": "70a0caf3-3fb2-4a96-b6e8-991252a88efe",
"txID": "af4467a9-7c0a-4437-acf3-e5060509a5d9"
},
{
"currency": "USD",
"amount": 2723.24,
"transactedAt": "2023-05-09 18:33:55.453689 -0400 EDT",
"clientID": "70a0caf3-3fb2-4a96-b6e8-991252a88efe",
"txID": "af4467a9-7c0a-4437-acf3-e5060509a5d9"
}
]
}
}
Transaction Details for a Specific Currency
Request: A valid Currency Code
must be provided as a parameter. The parameters accepted are listed below.
If a pageCursor
is supplied, all other parameters except for the pageSize
are ignored.
Optional:
pageCursor
: Defaults to 10.
Initial Page (required):
month
: Month for which the transactions are being requested.year
: Year for which the transactions are being requested.timezone
: Timezone for which the transactions are being requested.
query {
transactionDetailsAllFiat(input:{
currency: "USD"
pageSize: "3"
timezone: "-04:00"
month: "5"
year: "2023"
}) {
transactions {
currency
amount
transactedAt
clientID
txID
}
links {
pageCursor
}
}
}
Subsequent Pages (required)
pageCursor
: Hashed page cursor for the next page of data.
query {
transactionDetailsAllFiat(input:{
currency: "USD"
pageSize: "3"
pageCursor: "-GQBZ1LNxWCXItw7mek5Gumc4IwzUfH7yHN0aDJMecTULYvpDAHcjdkZUaGO_gGweET2_9H78mx5_81F2JsKwXwQot9UoFlU8IlHlTWlQArP"
}) {
transactions {
currency
amount
transactedAt
clientID
txID
}
links {
pageCursor
}
}
}
Response: All Transaction-related details for a specific currency in a given timezone and date are returned. In the event of an external deposit, there will be a single entry reporting the deposited amount. When querying for an internal transfer, two entries will be returned - one for the source and the other for the destination accounts.
Initial Page
{
"data": {
"transactionDetailsAllFiat": {
"transactions": [
{
"currency": "USD",
"amount": 100.11,
"transactedAt": "2023-05-15 16:59:24.243332 -0400 EDT",
"clientID": "70a0caf3-3fb2-4a96-b6e8-991252a88efe",
"txID": "043d82a9-113b-4aa7-a3e1-029cc4728926"
},
{
"currency": "USD",
"amount": 100.11,
"transactedAt": "2023-05-15 16:58:54.84774 -0400 EDT",
"clientID": "70a0caf3-3fb2-4a96-b6e8-991252a88efe",
"txID": "04ab99a6-c054-4592-b9cb-477369e0e9d8"
},
{
"currency": "USD",
"amount": 100.11,
"transactedAt": "2023-05-15 16:57:45.752318 -0400 EDT",
"clientID": "70a0caf3-3fb2-4a96-b6e8-991252a88efe",
"txID": "1c57d150-9a93-4e4d-aef3-a8c3a14ff433"
}
],
"links": {
"pageCursor": "-GQBZ1LNxWCXItw7mek5Gumc4IwzUfH7yHN0aDJMecTULYvpDAHcjdkZUaGO_gGweET2_9H78mx5_81F2JsKwXwQot9UoFlU8IlHlTWlQArP"
}
}
}
}
Subsequent Page
{
"data": {
"transactionDetailsAllFiat": {
"transactions": [
{
"currency": "USD",
"amount": 1345.67,
"transactedAt": "2023-05-14 11:57:47.796057 -0400 EDT",
"clientID": "70a0caf3-3fb2-4a96-b6e8-991252a88efe",
"txID": "8522591d-6463-4cc6-9e3c-c456c98a6755"
},
{
"currency": "USD",
"amount": 2723.24,
"transactedAt": "2023-05-09 18:33:55.453689 -0400 EDT",
"clientID": "70a0caf3-3fb2-4a96-b6e8-991252a88efe",
"txID": "af4467a9-7c0a-4437-acf3-e5060509a5d9"
},
{
"currency": "USD",
"amount": 10101.11,
"transactedAt": "2023-05-09 18:29:48.729195 -0400 EDT",
"clientID": "70a0caf3-3fb2-4a96-b6e8-991252a88efe",
"txID": "1d7e1e70-0f9d-41b4-9f85-6dc310aa8f2d"
}
],
"links": {
"pageCursor": ""
}
}
}
}
Crypto Account Mutations and Queries
Open Account
Request: All fields are required.
mutation {
openCrypto(ticker: "ETH") {
clientID,
ticker
}
}
Response: Confirmation information containing the Client ID
and Ticker
of the newly opened account.
{
"data": {
"openCrypto": {
"clientID": "70a0caf3-3fb2-4a96-b6e8-991252a88efe",
"ticker": "ETH"
}
}
}
Offer
To convert between a Cryptocurrency and a Fiat currencies, the user must maintain open accounts in both the source and destination currencies. The amount specified will be in the source currency and the amount to deposit into the destination account will be calculated based on the exchange rate.
The workflow will involve getting a conversion rate quote, referred to as an Offer
. The returned rate quote Offer
will only be valid for a two-minute time window. The expiration time will be returned to the user as a Unix timestamp.
The user must issue a subsequent request using the encrypted Offer ID
to complete the transaction.
Purchase
Request: All fields are required.
mutation {
offerCrypto(input: {
sourceAmount: 1234.56
sourceCurrency: "USD"
destinationCurrency: "BTC"
isPurchase: true
}) {
priceQuote{
clientID,
sourceAcc,
destinationAcc,
rate,
amount
},
debitAmount,
offerID,
expires
}
}
Response: A rate quote with an encrypted Offer ID
.
{
"data": {
"offerCrypto": {
"priceQuote": {
"clientID": "a83a2506-f812-476b-8e14-9fa100126518",
"sourceAcc": "USD",
"destinationAcc": "BTC",
"rate": 0.00003779753759799514,
"amount": 0.04666333
},
"debitAmount": 1234.56,
"offerID": "VltcBxmGjFcDL4YV8-xWVSp3WEnuF5oVVyPI9p7DV-A5WGrXTmPvwa11VbJRoElt",
"expires": 1686255413
}
}
}
Sell
Request: All fields are required.
mutation {
offerCrypto(input: {
sourceAmount: 1234.56
sourceCurrency: "BTC"
destinationCurrency: "USD"
isPurchase: false
}) {
priceQuote{
clientID,
sourceAcc,
destinationAcc,
rate,
amount
},
debitAmount,
offerID,
expires
}
}
Response: A rate quote with an encrypted Offer ID
.
{
"data": {
"offerCrypto": {
"priceQuote": {
"clientID": "a83a2506-f812-476b-8e14-9fa100126518",
"sourceAcc": "BTC",
"destinationAcc": "USD",
"rate": 26455.3975169303,
"amount": 32660775.56
},
"debitAmount": 1234.56,
"offerID": "YzLpRLex_bWKuNhXBji2wd0VkIxNnn3eYvBwRp204wjJIO2lDXv3jz73lr3LsL--",
"expires": 1686255663
}
}
}
Exchange
Execute a Cryptocurrency purchase or sale using a valid exchange offer that must be obtained prior using the
crypto/offer
mutation.
Purchase
Request: All fields are required.
mutation {
exchangeCrypto(offerID: "roqzjmgIxlHMHWdSmJcRVby7RPvLEIzuMJ3ajH3bIr0YRukzd8XIL-rcUYRsE10R") {
fiatTxReceipt{
currency,
amount,
transactedAt,
clientID,
txID,
},
cryptoTxReceipt{
ticker,
amount,
transactedAt,
clientID,
txID,
},
}
}
Response: A receipt with the Fiat and Cryptocurrency transaction information.
{
"data": {
"exchangeCrypto": {
"fiatTxReceipt": {
"currency": "USD",
"amount": -1234.56,
"transactedAt": "2023-06-08 17:44:27.766461 -0400 EDT",
"clientID": "a83a2506-f812-476b-8e14-9fa100126518",
"txID": "4650fa28-1ad5-46fc-97a8-15c21ee8608e"
},
"cryptoTxReceipt": {
"ticker": "BTC",
"amount": 0.04653972,
"transactedAt": "2023-06-08 17:44:27.766461 -0400 EDT",
"clientID": "a83a2506-f812-476b-8e14-9fa100126518",
"txID": "4650fa28-1ad5-46fc-97a8-15c21ee8608e"
}
}
}
}
Sell
Request: All fields are required.
mutation {
exchangeCrypto(offerID: "LQq07LHQdqCbwuXuxkH-rW6-WMcBhi2RG9q9HSKOwh8TcxzG_DWg_iOW9m9xdZy8") {
fiatTxReceipt{
currency,
amount,
transactedAt,
clientID,
txID,
},
cryptoTxReceipt{
ticker,
amount,
transactedAt,
clientID,
txID,
},
}
}
Response: A receipt with the Fiat and Cryptocurrency transaction information.
{
"data": {
"exchangeCrypto": {
"fiatTxReceipt": {
"currency": "USD",
"amount": 864247.73,
"transactedAt": "2023-06-08 17:06:03.192364 -0400 EDT",
"clientID": "a83a2506-f812-476b-8e14-9fa100126518",
"txID": "b4df7d86-36b0-407b-8acf-21cccbc88386"
},
"cryptoTxReceipt": {
"ticker": "BTC",
"amount": -32.45,
"transactedAt": "2023-06-08 17:06:03.192364 -0400 EDT",
"clientID": "a83a2506-f812-476b-8e14-9fa100126518",
"txID": "b4df7d86-36b0-407b-8acf-21cccbc88386"
}
}
}
}
Info
Balance for a Specific Currency
Request: A valid Cryptocurrency ticker must be provided as a query parameter.
query {
balanceCrypto(ticker:"BTC") {
ticker,
balance,
lastTx,
lastTxTs,
createdAt,
clientID,
}
}
Response: Account balance related details associated with the currency.
{
"data": {
"balanceCrypto": {
"ticker": "BTC",
"balance": 46.69881177,
"lastTx": 46.69881177,
"lastTxTs": "2023-06-09 16:51:55.520098 -0400 EDT",
"createdAt": "2023-06-09 16:51:03.466403 -0400 EDT",
"clientID": "6bc1d17e-68c6-4b82-80fd-542c4d3aba9b"
}
}
}
Balance for all Currencies for a Client
Request: The initial request can only contain an optional page size
, which if not provided will default to 10. The
subsequent responses will contain encrypted page cursors that must be specified to retrieve the following page of data.
Initial request: The pageCursor
will not be provided and the pageSize
is optional and will default to 10.
query {
balanceAllCrypto(pageSize:3) {
accountBalances{
ticker
balance
lastTx
lastTxTs
createdAt
clientID
}
links{
pageCursor
}
}
}
Subsequent requests: The pageCursor
must be provided but the pageSize
is optional.
query {
balanceAllCrypto(pageCursor:"h-_7rSoD-IQrbdvYYf35hvXMaUJCbqdzLpq3Nl9N9xY=" pageSize:3) {
accountBalances{
ticker
balance
lastTx
lastTxTs
createdAt
clientID
}
links{
pageCursor
}
}
}
Response: The number of account balances for the Client will be limited to the Page Size
specified and is 10
by
default. A Page Cursor
link will be supplied if there are subsequent pages of data to be retrieved in the
links.pageCursor
JSON field.
{
"data": {
"balanceAllCrypto": {
"accountBalances": [
{
"ticker": "BTC",
"balance": 46.34282387,
"lastTx": -0.356,
"lastTxTs": "2023-06-09 17:34:27.727458 -0400 EDT",
"createdAt": "2023-06-09 16:51:03.466403 -0400 EDT",
"clientID": "6bc1d17e-68c6-4b82-80fd-542c4d3aba9b"
},
{
"ticker": "ETH",
"balance": 55.34777231,
"lastTx": 55.34777231,
"lastTxTs": "2023-06-10 16:04:55.296635 -0400 EDT",
"createdAt": "2023-06-09 16:50:57.79957 -0400 EDT",
"clientID": "6bc1d17e-68c6-4b82-80fd-542c4d3aba9b"
},
{
"ticker": "USDC",
"balance": 6858.73307085,
"lastTx": 6858.73307085,
"lastTxTs": "2023-06-10 16:03:11.572976 -0400 EDT",
"createdAt": "2023-06-10 16:31:30.761357 -0400 EDT",
"clientID": "6bc1d17e-68c6-4b82-80fd-542c4d3aba9b"
}
],
"links": {
"pageCursor": "h-_7rSoD-IQrbdvYYf35hvXMaUJCbqdzLpq3Nl9N9xY="
}
}
}
}
{
"data": {
"balanceAllCrypto": {
"accountBalances": [
{
"ticker": "USDT",
"balance": 3454.64683023,
"lastTx": 3454.64683023,
"lastTxTs": "2023-06-10 16:03:56.273477 -0400 EDT",
"createdAt": "2023-06-10 13:31:24.450086 -0400 EDT",
"clientID": "6bc1d17e-68c6-4b82-80fd-542c4d3aba9b"
}
],
"links": {
"pageCursor": ""
}
}
}
}
Transaction Details for a Specific Transaction
Request: A valid Transaction ID
must be provided as a query parameter.
query {
transactionDetailsCrypto(transactionID: "05cef33f-2082-48c4-ad08-e0f8dc5d4444")
}
Response: Transaction-related details for a specific transaction. There will be one entry for the Fiat currency account and another for the Cryptocurrency account.
Purchase
{
"data": {
"transactionDetailsCrypto": [
{
"currency": "USD",
"amount": "-0.32",
"transactedAt": "2023-06-09T17:25:01.62373-04:00",
"clientID": "6bc1d17e-68c6-4b82-80fd-542c4d3aba9b",
"txID": "05cef33f-2082-48c4-ad08-e0f8dc5d4444"
},
{
"ticker": "BTC",
"amount": "0.0000121",
"transactedAt": "2023-06-09T17:25:01.62373-04:00",
"clientID": "6bc1d17e-68c6-4b82-80fd-542c4d3aba9b",
"txID": "05cef33f-2082-48c4-ad08-e0f8dc5d4444"
}
]
}
}
Sell
{
"data": {
"transactionDetailsCrypto": [
{
"currency": "USD",
"amount": "9410.35",
"transactedAt": "2023-06-09T17:34:27.727458-04:00",
"clientID": "6bc1d17e-68c6-4b82-80fd-542c4d3aba9b",
"txID": "0cadcb76-8d26-4a1a-bf03-d3392c80d57b"
},
{
"ticker": "BTC",
"amount": "-0.356",
"transactedAt": "2023-06-09T17:34:27.727458-04:00",
"clientID": "6bc1d17e-68c6-4b82-80fd-542c4d3aba9b",
"txID": "0cadcb76-8d26-4a1a-bf03-d3392c80d57b"
}
]
}
}
Transaction Details for a Specific Currency
Request: A valid cryptocurrency ticker
must be provided as a parameter. The parameters accepted are listed below.
If a pageCursor
is supplied, all other parameters except for the pageSize
are ignored.
Optional:
pageCursor
: Defaults to 10.
Initial Page (required):
month
: Month for which the transactions are being requested.year
: Year for which the transactions are being requested.timezone
: Timezone for which the transactions are being requested.
query {
transactionDetailsAllCrypto(input:{
ticker: "BTC"
pageSize: "3"
timezone: "-04:00"
month: "6"
year: "2023"
}) {
transactions {
ticker
amount
transactedAt
clientID
txID
}
links {
pageCursor
}
}
}
Subsequent Pages (required)
pageCursor
: Hashed page cursor for the next page of data.
query {
transactionDetailsAllCrypto(input:{
ticker: "BTC"
pageSize: "3"
pageCursor: "-GQBZ1LNxWCXItw7mek5Gumc4IwzUfH7yHN0aDJMecTULYvpDAHcjdkZUaGO_gGweET2_9H78mx5_81F2JsKwXwQot9UoFlU8IlHlTWlQArP"
}) {
transactions {
ticker
amount
transactedAt
clientID
txID
}
links {
pageCursor
}
}
}
Response: All Transaction-related details for a specific currency in a given timezone and date are returned. In the event of an external deposit, there will be a single entry reporting the deposited amount. When querying for an internal transfer, two entries will be returned - one for the source and the other for the destination accounts.
Initial Page
{
"data": {
"transactionDetailsAllCrypto": {
"transactions": [
{
"ticker": "BTC",
"amount": -2.12,
"transactedAt": "2023-06-10 17:04:47.955017 -0400 EDT",
"clientID": "6bc1d17e-68c6-4b82-80fd-542c4d3aba9b",
"txID": "22d872d4-3cae-4cda-888d-f5554aebd969"
},
{
"ticker": "BTC",
"amount": -0.356,
"transactedAt": "2023-06-09 16:34:27.727458 -0400 EDT",
"clientID": "6bc1d17e-68c6-4b82-80fd-542c4d3aba9b",
"txID": "0cadcb76-8d26-4a1a-bf03-d3392c80d57b"
},
{
"ticker": "BTC",
"amount": 0.0000121,
"transactedAt": "2023-06-09 16:25:01.62373 -0400 EDT",
"clientID": "6bc1d17e-68c6-4b82-80fd-542c4d3aba9b",
"txID": "05cef33f-2082-48c4-ad08-e0f8dc5d4444"
}
],
"links": {
"pageCursor": "j7Aa4RPFj6WmLRC5WSwy_kb7_NCiOkR6uE68LKF9QpleS3uTzQnv48RgPikwar-uCZ5BGEkahWDZRyIPMD7hqRrWv7f9nFJetsxTwu9oCNFp"
}
}
}
}
Subsequent Page
{
"data": {
"transactionDetailsAllCrypto": {
"transactions": [
{
"ticker": "BTC",
"amount": 46.69881177,
"transactedAt": "2023-06-09 16:51:55.520098 -0400 EDT",
"clientID": "6bc1d17e-68c6-4b82-80fd-542c4d3aba9b",
"txID": "84cb55e0-d049-4d89-8d0c-9a48bae6461b"
}
],
"links": {
"pageCursor": ""
}
}
}
}