Currency networks list#
Returns all registered currency networks with high-level information.
Request#
Example Request#
Response#
Attribute | Type | JSON Type | Description |
---|
abbreviation | string | string | Abbreviated name of currency network |
address | address | string - hex-encoded prefixed with "0x" | Contract address of currency network |
decimals | int | number | Decimals specified in currency network |
name | string | string | Full name of the currency network |
numUsers | int | number | Total number of users in currency network |
capacityImbalanceFeeDivisor | int | number | The divisor on value transferred for the mediator fees |
defaultInterestRate | BigInteger | string | The default interest rate for every user in the network |
interestRateDecimals | int | number | Decimals of the interest rate |
customInterests | bool | bool | Whether custom interest rate can be set by users |
preventMediatorInterests | bool | bool | Whether to prevent mediators from paying interest |
isFrozen | bool | bool | Whether the currency network is frozen |
Example Response#
Currency Network Details#
Returns detailed information of currency network.
Request#
URL Parameters#
Name | Type | Required | Description |
---|
networkAddress | string prefixed with "0x" | YES | Address of currency network |
Example Request#
Response#
Attribute | Type | JSON Type | Description |
---|
abbreviation | string | string | Abbreviated name of currency network |
address | address | string - hex-encoded prefixed with "0x" | Contract address of currency network |
decimals | int | number | Decimals specified in currency network |
name | string | string | Full name of the currency network |
numUsers | int | number | Total number of users in currency network |
capacityImbalanceFeeDivisor | int | number | The divisor on value transferred for the mediator fees |
defaultInterestRate | BigInteger | string | The default interest rate for every user in the network |
interestRateDecimals | int | number | Decimals of the interest rate |
customInterests | bool | bool | Whether custom interest rate can be set by users |
preventMediatorInterests | bool | bool | Whether to prevent mediators from paying interest |
isFrozen | bool | bool | Whether the currency network is frozen |
Example Response#
Users List in Currency Network#
Returns a list of user addresses in a currency network.
Request#
URL Parameters#
Name | Type | Required | Description |
---|
networkAddress | string | YES | Address of currency network |
Example Request#
Response#
string[]
- Array with addresses of users in currency network
Example Response#
Trustlines List in Currency Network#
Returns a list of all trustlines in a currency network.
Request#
URL Parameters#
Name | Type | Required | Description |
---|
networkAddress | string | YES | Address of currency network |
Example Request#
Response#
A list of trustlines with the following attributes:
Attribute | Type | Description |
---|
counterParty | string | Address of trustline counterparty |
currencyNetwork | string | Address of currency network |
user | string | Address of trustline user |
balance | string | Balance of trustline from point of view of user |
given | string | Creditline given to counterparty |
received | string | Creditline received by counterparty |
leftGiven | string | given - balance |
leftReceived | string | received + balance |
interestRateGiven | string | Interest Rate given to counterparty |
interestRateReceived | string | Interest Rate received from counterparty |
isFrozen | bool | Whether the trustlines is frozen |
id | string | Identifier of trustline |
Example Response#
User Details in Currency Network#
Returns detailed information of a user in a currency network.
Request#
URL Parameters#
Name | Type | Required | Description |
---|
networkAddress | string | YES | Address of currency network |
userAddress | string | YES | Address of user |
Example Request#
Response#
Attribute | Type | JSON Type | Description |
---|
balance | BigInteger | string | Sum over balances of all non-frozen trustlines user has in currency network |
frozenBalance | BigInteger | string | Sum over balances of all frozen trustlines user has in currency network |
given | BigInteger | string | Sum of all creditlines given by user in currency network |
received | BigInteger | string | Sum of all creditlines received by user in currency network |
leftGiven | BigInteger | string | given - balance |
leftReceived | BigInteger | string | received + balance |
Example Response#
Trustlines of user in currency network#
Returns a list of trustlines a user has in a currency network.
Request#
URL Parameters#
Name | Type | Required | Description |
---|
networkAddress | string | YES | Address of currency network |
userAddress | string | YES | Address of user |
Example Request#
Response#
Attribute | Type | Description |
---|
counterParty | string | Address of trustline counterparty |
currencyNetwork | string | Address of currency network |
user | string | Address of trustline user |
balance | string | Balance of trustline from point of view of user |
given | string | Creditline given to counterparty |
received | string | Creditline received by counterparty |
leftGiven | string | given - balance |
leftReceived | string | received + balance |
interestRateGiven | string | Interest Rate given to counterparty |
interestRateReceived | string | Interest Rate received from counterparty |
isFrozen | bool | Whether the trustlines is frozen |
id | string | Identifier of trustline |
Example Response#
Trustline between users in currency network#
Returns a trustline between users A and B in a currency network.
Request#
URL Parameters#
Name | Type | Required | Description |
---|
networkAddress | string | YES | Address of currency network |
userAddressA | string | YES | Address of user A |
userAddressB | string | YES | Address of user B |
Example Request#
Response#
Attribute | Type | Description |
---|
counterParty | string | Address of trustline counterparty |
user | string | Address of trustline user |
balance | string | Balance of trustline from point of view of user (A) |
given | string | Creditline given to counterparty |
received | string | Creditline received by counterparty |
leftGiven | string | given - balance |
leftReceived | string | received + balance |
interestRateGiven | string | Interest Rate given to counterparty |
interestRateReceived | string | Interest Rate received from counterparty |
isFrozen | bool | Whether the trustline is forzen |
id | string | Identifier of trustline |
Example Response#
Spendable amount and path to any user in currency network#
Returns an estimation on the amount user A can spend to any reachable user B in a currency network.
Request#
URL Parameters#
Name | Type | Required | Description |
---|
networkAddress | string | YES | Address of currency network |
Data Parameters#
Name | Type | Required | Description |
---|
from | string | YES | Address of user who sends transfer |
to | string | YES | Address of user who receives transfer |
maxHops | string | NO | Upper bound for hops in transfer path |
Example Request#
Response#
Attribute | Type | Description |
---|
capacity | string | Estimated capacity of estimated max capacity path |
path | string[] | Addresses of users on max capacity path |
Example Response#
Transfer path in currency network#
Returns the cheapest path and maximal fees for a transfer.
Request#
URL Parameters#
Name | Type | Required | Description |
---|
networkAddress | string | YES | Address of currency network |
Data Parameters#
Name | Type | Required | Description |
---|
from | string | YES | Address of user who sends transfer |
to | string | YES | Address of user who receives transfer |
value | string | YES | Transfer amount in smallest unit |
maxFees | string | NO | Upper bound for transfer fees |
maxHops | string | NO | Upper bound for hops in transfer path |
feePayer | string | NO | Either sender or receiver |
Example Request#
Response#
Attribute | Type | Description |
---|
path | string[] | Addresses of users on transfer path |
value | int | Transfer amount in smallest unit |
feePayer | string | Either sender or receiver |
fees | string | Maximal transfer fees |
Example Response#
Closing trustline path in currency network#
This endpoint is used in preparation for closing a trustline. It returns the
cheapest path, the fees and a value for a payment,
which reduces the balance to zero. At the moment this only works for negative
balances.
Request#
URL Parameters#
Name | Type | Required | Description |
---|
networkAddress | string | YES | Address of currency network |
Data Parameters#
Name | Type | Required | Description |
---|
from | string | YES | Address of user who wants to close a trustline |
to | string | YES | Address of user with whom the trustline should be closed |
maxFees | string | NO | Upper bound for transfer fees |
maxHops | string | NO | Upper bound for hops in transfer path |
Example Request#
Response#
Attribute | Type | Description |
---|
path | string[] | Addresses of users on transfer path |
fees | string | Estimated transfer fees |
value | string | Amount to be transferred in smallest unit |
feePayer | string | Either sender or receiver |
Example Response#
All events in currency network#
Returns a list of event logs in a currency network.
Request#
URL Parameters#
Name | Type | Required | Description |
---|
network | string | YES | Address of currency network |
type | string | NO | Either TrustlineUpdate , TrustlineUpdateRequest , TrustlineUpdateCancel , Transfer , DebtUpdate , NetworkFreeze , or BalanceUpdate |
fromBlock | int | NO | Start of block range |
Example Request#
Response#
Returns a list of the events in a currency network. By default this will return events of type
TrustlineUpdate
, TrustlineUpdateRequest
, TrustlineUpdateCancel
, and Transfer
See Event Response for a detail of the possible values returned.
Events of a user in currency network#
Returns a list of event logs of a user in a currency network. This means all events where the given user address is either from
or to
.
Request#
Example Request#
URL Parameters#
Name | Type | Required | Description |
---|
network | string | YES | Address of currency network |
user | string | YES | Address of user |
type | string | NO | Either TrustlineUpdate , TrustlineUpdateRequest , TrustlineUpdateCancel or Transfer |
fromBlock | int | NO | Start of block range |
Response#
Returns a list of the events of a user in a currency network. These events can be of type
TrustlineUpdate
, TrustlineUpdateRequest
, TrustlineUpdateCancel
, Transfer
, DebtUpdate
, or BalanceUpdate
See Event Response for a detail of the possible values returned.
Events of a trustline in currency network#
Returns a list of event logs of a trustline in a currency network from the view of user.
Request#
Example Request#
URL Parameters#
Name | Type | Required | Description |
---|
network | string | YES | Address of currency network |
user | string | YES | Address of user, one address of the trustline |
counterParty | string | YES | Address of counterParty, other address of the trustline |
type | string | NO | Either TrustlineUpdate , TrustlineUpdateRequest , TrustlineUpdateCancel or BalanceUpdate |
fromBlock | int | NO | Start of block range |
Response#
Returns a list of the events of a trustline, these events can be of type
TrustlineUpdate
, TrustlineUpdateRequest
, TrustlineUpdateCancel
, or BalanceUpdate
See Event Response for a detail of the possible values returned.
Accrued interests of user#
Returns a list of all accrued interests for user.
Request#
Example Request#
URL Parameters#
Name | Type | Required | Description |
---|
network | string prefixed with "0x" | YES | Address of currency network |
user | string prefixed with "0x" | YES | Address of concerned user |
startTime | integer | NO | Start of time window to get list for (default: 0) |
endTime | integer | NO | End of time window to get list for (default: now) |
Response#
The response is a list of objects with the following elements:
Attribute | Type | JSON Type | Description |
---|
accruedInterests | string | array | list of accrued interests |
user | address | string | Address of user |
counterparty | address | string | Address of counterparty |
The accuredInterests
is a list with the following elements:
Attribute | Type | JSON Type | Description |
---|
value | BigInteger | string | signed interest accrued viewed from user |
interestRate | integer | integer | interest rate for this accrued interest |
timestamp | integer | integer | timestamp of accrued interest |
Example Response#
Accrued interests of trustline#
Returns a list of all accrued interests for a trustline in between user and counterparty as seen by user.
Request#
Example Request#
URL Parameters#
Name | Type | Required | Description |
---|
network | string prefixed with "0x" | YES | Address of currency network |
user | string prefixed with "0x" | YES | Address of concerned user |
counterparty | string prefixed with "0x" | YES | Address of concerned counterparty |
startTime | integer | NO | Start of time window to get list for (default: 0) |
endTime | integer | NO | End of time window to get list for (default: now) |
Response#
The response is a an objects with the following elements:
Attribute | Type | JSON Type | Description |
---|
accruedInterests | string | array | list of accrued interests |
user | address | string | Address of user |
counterparty | address | string | Address of counterparty |
The accuredInterests
is a list with the following elements:
Attribute | Type | JSON Type | Description |
---|
value | BigInteger | string | signed interest accrued viewed from user |
interestRate | integer | integer | interest rate for this accrued interest |
timestamp | integer | integer | timestamp of accrued interest |
Example Response#
Information for transfer in transaction#
Returns information about all trustline transfer applied by transaction with given hash
or identified by block hash and log index.
Request#
To get transfer details via transaction hash:
To get transfer details via transfer id:
Data Parameters#
Name | Type | Required | Description |
---|
transactionHash | string | No | Hash of transaction responsible for transfer |
blockHash | string | No | Hash of block identifying transfer event |
logIndex | number | No | Log index identifying transfer event |
Example Request#
To get transfer details via transaction hash:
To get transfer details via transfer id:
Total transferred sum in between users of currency networks#
Returns the total transferred sum from a user to another user in a currency network in a time window.
Request#
Example Request#
URL Parameters#
Name | Type | Required | Description |
---|
network | string prefixed with "0x" | YES | Address of currency network |
sender | string prefixed with "0x" | YES | Address of sender of transfers |
receiver | string prefixed with "0x" | YES | Address of receiver of transfers |
startTime | integer | NO | Start of time window to get list for (default: 0) |
endTime | integer | NO | End of time window to get list for (default: now) |
Response#
The response is a an objects with the following elements:
Attribute | Type | JSON Type | Description |
---|
sender | address | string | Address of sender of transfers |
receiver | address | string | Address of user |
startTime | timestamp | number | start of time window to fetch transfers |
endTime | timestamp | number | end of time window to fetch transfers |
value | BigInteger | string | Total value sent in between users |
Example Response#