Loch API Documentation

Access everything you need to know about any wallet address


Definitions


Wallet Address
A wallet address is an entity that can send transactions and hold balances on a blockchain. This is primary input requirement for Loch's API. Wallet addresses take the form of 16 randomized alphanumeric characters. For example: 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045.

Net worth
This refers to the total value of all crypto assets held by a given wallet address. We use $ USD as our default measure.

Unrealized profit or loss
We can return the unrealized PNL for the entire portfolio or for specific assets in the portfolio.
Unrealized Profit or Loss = Current net worth - Average Cost Basis
Average Cost basis = Weighted average of all instances the asset was purchased. Price is taken on the day the asset enters the wallet.

Net flows
Net flows are calculated as the difference between the outflows and inflows for a given portfolio. Outflows refer to all asset transactions leaving the address, while inflows represent the opposite. Time period can be specified and assets can be specified.

NFTs
A non-fungible token is a unique digital identifier that is recorded on a blockchain and is used to certify ownership and authenticity. Loch can provide the collection name and the current floor price.

Floor Price
The most simple definition of an NFT floor price is that it is the lowest price for any NFT in a given collection. Generally speaking, NFT floor prices are an attempt for market participants to glean insight into the fair market value of an NFT project at the collection level

Counterparties
Counterparties are financial intermediaries that facilitate activity on blockchains. These can include decentralized exchanges (DEXs), centralized exchanges (CEXs), lending platforms, borrowing platforms, staking platforms, and others.

Time Period
This is required for calculating things like net flows, counterparties, or historic data like transactions. It's not required for things stock variables like net worth and unrealized pnl. The default option is 1 month. You can specify 1 month, 6 months, 1 year, 5 years or some specific arbitrary time period too.

Specific assets
By default we provide data on all crypto assets. Loch supports over 10k crypto assets. You can limit API requests to certain crypto assets like BTC, ETH, USDT, USDC etc. Limiting data requests can improve response times and reduce computational cost.


API Request Specifications


Input:
    .1Wallet Address [required]
    .2Time period [optional]
    .3Specific asset(s) [optional]

Output: 
    .1Net worth
    .2Unrealized profit or loss for entire wallet
    .3Net Flows (default is 1 month)
    .4Assets held by amount
    .5NFTs held by floor price and collection name
    .6Top 10 Counterparties by $ Volume (default is 1 month)

  • To start out, we recommend supplying us with a list of wallet addresses and specify which outputs you'd like to receive.
  • We can provide an API response in a spreadsheet or JSON file. Response times will vary based on the number of wallet addresses and the type of outputs requested.
  • If the data matches your needs we can give you access to Loch API keys with specified rate limits.
  • Please reach out to  prithvir@loch.one  or @prithvir1 on Telegram for a trial period.