Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Comprehensive API documentation can be found at https://whalebooks.com/open-api .

  • First, you need to obtain an API key. To acquire one, contact support.

  • Next, authenticate using this API key by including it in the "X-Api-Key" header.

Here is are the recommended suggested approach:

1. Create a User

...

Under an existing or new user, you’ll need to create an organization for which you will have write access.

Use: POST /api/v2/organizations and pass userId in request:

...

Code Block
{
   "name": "fromAPI1",
   "portfolioId": 1,
   "type": "MANUAL"  # you should always use type manual in this usecase
}

Create transactions

Use: POST /api/v2/organizations//vaults//containers/{container-id}/transactions

Example body:

Code Block
{
   "baseCurrency":"BTC",
   "quoteCurrency":"USD",
   "type":"BUY",
   "timestamp":1675209600698,
   "note":"",
   "addresses":[],
   "baseQuantity":"10",
   "quoteQuantity":"",
   "unitPrice":"25000"
}

Get portfolio calculations

Use: GET /api/v2/organizations/{organization-id}/vaults/{vault-id}/portfolios/{portfolio-id}/computation/dashboard