This will return the account information associated with the owner address provided.
Path Parameters
Name
Type
Description
owner_address
string
Ethereum address, owner of the account
{ "account": "0x3F62d3Ca386175E65154732910DB76aEcB4024e1" }ThaccountFromOwner() Error: 'Insert into messages' is not a valid address
{
"err": "accountFromOwner() Error: not_an_address is not a valid address",
"code": 400
}
Get Account Tokens
GEThttps://api.brink.trade/account_tokens/:owner
Given an owner address, this API will return the token addresses of the owned tokens of the Brink account associated with that owner address , as well as the Brink account address
Get all messages with the selected states. State is Brink's own internal determination of the message's current state.
You can pass in the following options individually:
ALL will return every message
EXECUTABLE will return all executable messages
(Executable: QUEUED, IN_PROGRESS, INSUFFICIENT_FUNDS, RETRY, UNDER_LIMIT, UNDER_PROFIT)
(Note this does not mean they are profitable)
The full list of possible states are as follows:
QUEUED: A message that is in our SQS queue and will soon be handled
IN_PROGRESS: A message that is currently being evaluated by one of our executors
INSUFFICIENT_FUNDS: A message that occurs when an account does not have the required funds for the transaction to be successful, but would otherwise be executable
RETRY: A message that has either failed between 1-5 transactions, was not executed because of executor error, or is in this state by default once created. Once a transaction fails more than 5 messages, the state becomes 'NEVER_EXECUTABLE'
UNDER_LIMIT: A message that when last evaluated could not be executed because the requested limit had not yet been crossed
UNDER_PROFIT: A message the when last evaluated had crossed the limit threshold, but the profit for the executor would not cover gas costs
NEVER_EXECUTABLE: A message that has been determine to be never executable by our executors
Note if no state parameter is provided, the API will default to ALL
{
"err": "UNDER_WATER is not a valid QUEUE_STATE",
"code": 400
}
Get Events
GEThttps://api.brink.trade/events
The Get Events API is a server-sent event stream that allows you to retrieve new messages as they are inserted into the database.
In the code block below you will find a reference implementation on the client side (Node.js)
const EventSource = require("eventsource")
const source = new EventSource(`https://api.brink.trade`)
source.addEventListener('message', message => { console.log(message) })