Hatchfi API Objects
Overview
This is a list of Hatchfi's API objects that are currently available. Currently, our API supports accounts
, transactions
, providers
, scopes
,balances,
and parts
.
Account Object
Hatchfi's Account
object lives within the User
model and contains important data about each connection.
Field | Description |
---|---|
balances | An array of objects with data about the balances |
blockchain | If blockchain, the blockchain name will go here; if applicable, it defaults to null |
resourceType | Type of object, always balance |
address | The address of the connection, if applicable, defaults to null |
ticker | The ticker of the chain type, if applicable, defaults to null The address of the connection, if applicable, defaults to null |
id | Autogenerated id of the object |
status | Status of the account. Enum values: syncing , synced , failed |
provider | The provider the balance comes from, if applicable, defaults to null |
Below is an example of the Account
object
[
{
"balances": [
{
"ticker": "BNB",
"providerTicker": "BNB",
"name": "Binance Coin",
"fiatTicker": "USD",
"fiatValue": "32.614",
"logo": https://nomics-api.s3.us-east-2.amazonaws.com/static/images/currencies/BNB.jpg,
"resourceType": "balance",
"misc": [],
"amount": "0.10610489920078668",
"decimals": 18
}
],
"blockchain": "bsc",
"resourceType": "account",
"address": "0x151cB406371aB758594da2e619Ae305Ba247C7a7",
"ticker": "BNB",
"id": "5f907a4c-7c6e-42c9-8ffa-a6e6d9978961",
"status": "synced",
"provider": "bsc"
}
]
Transaction Object
Hatchfi's Transaction
contains important data about each connection's transaction.
Field | Description |
---|---|
parts | An array of objects with data about the parts of a transaction |
fees | The Providers ticker or symbol |
misc | An array that holds data that is unique to a particular protocol, exchange, or wallet that we currently do not parse, I.E., for Solana, we put parsed instructions here |
fiatCalculatedAt | The timestamp when the fiat price was calculated at |
InitiatedAt | A timestamp of when the Transaction was initiated |
ConfirmedAt | A timestamp confirmed at Transaction was confirmed by the blockchain |
ResourceType | Type of object, always transaction |
txId | The hash or ID of the transaction |
accountId | The id of the Account that owns this Transaction |
userId | The user ID the transaction belongs to |
status | This indicates the status of the transaction. Possible values: success , pending , failed , or unknown |
transactionType | The type of Transaction defaults to other |
Below is an example of the Transaction
object
{
"parts": [
{
"amount": "20",
"direction": "sent",
"fiatTicker": "USD",
"fiatValue": "29.51",
"otherParties": [
null
],
"providerTicker": "coinbase",
"ticker": "OP",
"resourceType": "part"
}
],
"fees": null,
"misc": [],
"fiatCalculatedAt": null,
"initiatedAt": 1654262763,
"confirmedAt": 1654262763,
"resourceType": "transaction",
"txId": "8a92533a-cded-5737-ac7a-8ac7f1d6d912",
"accountId": "d832d0cf-6f52-4dff-b605-85161a4e594a",
"userId": "helloMoto2121",
"status": "completed",
"transactionType": "buy"
}
Provider Object
Hatchfi's Provider
contains important metadata about each provider Hatchfi offers.
Field | Description |
---|---|
scopes | An array of objects with data about scope permissions |
currencies | An array of currencies the Provider may contain |
inputs | An array of inputs that the Provider will need to access user data |
notes | Notes for the end-user on Hatchfi Link |
networks | Networks available to connect to, I.E., a wallet might have multiple networks to choose from and connect to |
resourceType | Type of object, always provider |
_id | id of this provider object |
name | A lowercase and no spaces format of the Provider |
displayName | The name of the Provider for user display |
logo | The link to the Provider logo |
authType | Type of auth that the Provider requires there are three types: address , token , and passPhrase |
Below is an example of the Provider
object
{
"scopes": [
{
"name": "read_balances",
"displayName": "Read Balances",
"description": "Can read all balance information."
},
{
"name": "read_transactions",
"displayName": "Read Transactions",
"description": "Can read all transaction information."
}
],
"currencies": null,
"inputs": [
"apiKey",
"secretKey"
],
"notes": "Please enter your API and Secret Key.",
"networks": [],
"resourceType": "provider",
"_id": "62eb104e6f205cb754397d4b",
"name": "gemini",
"displayName": "Gemini",
"logo": "https://hatchfi.co/providers/standard/gemini.png",
"authType": "token"
}
Scopes Object
Hatchfi's scope
object lives within the providers
object and contains important data regarding permissions to access user data.
Field | Description |
---|---|
name | The name of the permission scope |
displayName | The stringified name of the permission scope |
description | The description of what permissions the scope allows |
{
"name": "read_transactions",
"displayName": "Read Transactions",
"description": "Can read all transaction information."
}
Balance Object
Hatchfi's Balance
object lives within the Account
model and contains important data about each connection's balance.
Field | Description |
---|---|
ticker | The currency's ticker or symbol |
providerTicker | The Providers ticker or symbol |
name | The currencies name |
fiatTicker | The fiat currency's ticker or symbol |
fiatValue | The fiat value of the currency |
logo | A URL for the logo of the currency |
resourceType | Type of object, always balance |
assetType | The type of asset depends on the Provider |
misc | Unused at this time |
amount | The amount in decimal format |
decimals | The number of decimals for this currency |
Below is an example of the Balance
object
{
"ticker": "BNB",
"providerTicker": "BNB",
"name": "Binance Coin",
"fiatTicker": "USD",
"fiatValue": "32.614",
"logo": https://nomics-api.s3.us-east-2.amazonaws.com/static/images/currencies/BNB.jpg,
"resourceType": "balance",
"misc": [],
"amount": "0.10610489920078668",
"decimals": 18
}
Parts Object
Hatchfi's parts
object lives within the transaction
object and contain important data about each connection's transaction.
Field | Description |
---|---|
amount | The amount in decimal format |
direction | Sent or received defaults to null |
fiatTicker | The fiat currency's ticker or symbol |
fiatValue | The fiat value of the currency |
otherParties | An array of addresses involved in the transaction; defaults to null |
providerTicker | The Providers ticker or symbol |
ticker | The currency's ticker or symbol |
resourceType | Type of object, always transaction |
Below is an example of the parts
object
"parts": [
{
"amount": "20",
"direction": "sent",
"fiatTicker": "USD",
"fiatValue": "29.51",
"otherParties": [
null
],
"providerTicker": "coinbase",
"ticker": "OP",
"resourceType": "part"
}
Updated 4 months ago