Class: InstitutionalClient
Client for Kraken Custody and OTC endpoints.
Extends
BaseRestClient
Constructors
Constructor
new InstitutionalClient(restClientOptions?: RestClientOptions, networkOptions?: AxiosRequestConfig): InstitutionalClient;Create an instance of the REST client. Pass API credentials in the object in the first parameter.
Parameters
| Parameter | Type | Description |
|---|---|---|
restClientOptions? | RestClientOptions | options to configure REST API connectivity |
networkOptions? | AxiosRequestConfig | HTTP networking options for axios |
Returns
InstitutionalClient
Inherited from
BaseRestClient.constructor
Methods
checkOtcClient()
checkOtcClient(params?: object): Promise<OTCCheckClientResponse>;Check OTC Eligibility
Retrieves the client permissions for the OTC Portal. API Key Permissions Required: Funds permissions - Query and Funds permissions - Deposit
Parameters
| Parameter | Type |
|---|---|
params? | { nonce?: number; } |
params.nonce? | number |
Returns
Promise<OTCCheckClientResponse>
createOtcQuoteRequest()
createOtcQuoteRequest(params: OTCCreateQuoteRequestParams): Promise<OTCCreateQuoteResponse>;Create OTC Quote
Creates a new OTC request for quote. API Key Permissions Required: Orders and trades - Create & modify orders
Parameters
| Parameter | Type |
|---|---|
params | OTCCreateQuoteRequestParams |
Returns
Promise<OTCCreateQuoteResponse>
generateNewOrderID()
generateNewOrderID(): string;Misc Utility Methods
Returns
string
getClientType()
getClientType(): RestClientType;Defines the client type (affecting how requests & signatures behave)
Returns
RestClientType
Overrides
BaseRestClient.getClientType
getCustodyActivitybyId()
getCustodyActivitybyId(params: object): Promise<CustodyGetActivityResponse>;Get activity by id
Retrieve details for a specific task activity.
Parameters
| Parameter | Type |
|---|---|
params | { id: string; nonce?: number; } |
params.id | string |
params.nonce? | number |
Returns
Promise<CustodyGetActivityResponse>
getCustodyDepositAddresses()
getCustodyDepositAddresses(params: CustodyDepositAddressesParams): Promise<CustodyDepositAddressesResponse>;Retrieve deposit addresses for an asset and funding method, or generate a new address. Use the Get Deposit Methods API to choose the deposit method.
Parameters
| Parameter | Type |
|---|---|
params | CustodyDepositAddressesParams |
Returns
Promise<CustodyDepositAddressesResponse>
getCustodyDepositMethods()
getCustodyDepositMethods(params: CustodyDepositMethodsParams): Promise<CustodyDepositMethodsResponse>;Get deposit methods
Retrieve the available deposit funding methods for depositing a specific asset. The deposit method is required to retrieve deposit addresses using the Get Deposit Addresses API.
Parameters
| Parameter | Type |
|---|---|
params | CustodyDepositMethodsParams |
Returns
Promise<CustodyDepositMethodsResponse>
getCustodyTaskbyId()
getCustodyTaskbyId(params: object): Promise<CustodyGetTaskResponse>;Get task by id
Retrieve details for a specific task.
Parameters
| Parameter | Type |
|---|---|
params | { id: string; nonce?: number; } |
params.id | string |
params.nonce? | number |
Returns
Promise<CustodyGetTaskResponse>
getCustodyTransactionbyId()
getCustodyTransactionbyId(params: CustodyGetTransactionParams): Promise<CustodyGetTransactionResponse>;Get transaction by id
Get transaction by id
Parameters
| Parameter | Type |
|---|---|
params | CustodyGetTransactionParams |
Returns
Promise<CustodyGetTransactionResponse>
getCustodyVaultbyId()
getCustodyVaultbyId(params: object): Promise<CustodyGetVaultResponse>;Get vault information by id
Retrieve information and balances for a specific vault.
Parameters
| Parameter | Type |
|---|---|
params | { id: string; nonce?: number; } |
params.id | string |
params.nonce? | number |
Returns
Promise<CustodyGetVaultResponse>
getCustodyWithdrawAddresses()
getCustodyWithdrawAddresses(params: CustodyWithdrawAddressesParams): Promise<CustodyWithdrawAddressesResponse>;Get withdraw addresses
Retrieve a list of withdrawal addresses for a specified vault.
Parameters
| Parameter | Type |
|---|---|
params | CustodyWithdrawAddressesParams |
Returns
Promise<CustodyWithdrawAddressesResponse>
getCustodyWithdrawMethods()
getCustodyWithdrawMethods(params: CustodyWithdrawMethodsParams): Promise<CustodyWithdrawMethodsResponse>;Get withdraw methods
Retrieve a list of withdrawal methods available for a specified vault.
Parameters
| Parameter | Type |
|---|---|
params | CustodyWithdrawMethodsParams |
Returns
Promise<CustodyWithdrawMethodsResponse>
getOtcActiveQuotes()
getOtcActiveQuotes(params?: object): Promise<OTCGetActiveQuotesResponse>;Get OTC Active Quotes
Retrieves a list of active OTC quotes. API Key Permissions Required: Orders and trades - Query open orders & trades
Parameters
| Parameter | Type |
|---|---|
params? | { nonce?: number; vault_id?: string; } |
params.nonce? | number |
params.vault_id? | string |
Returns
Promise<OTCGetActiveQuotesResponse>
getOtcExposures()
getOtcExposures(params?: object): Promise<OTCGetExposuresResponse>;Get OTC Exposures
Retrieves the max and used OTC exposures. API Key Permissions Required: Orders and trades - Query open orders & trades
Parameters
| Parameter | Type |
|---|---|
params? | { nonce?: number; } |
params.nonce? | number |
Returns
Promise<OTCGetExposuresResponse>
getOtcHistoricalQuotes()
getOtcHistoricalQuotes(params?: object): Promise<OTCGetHistoricalQuotesResponse>;Get OTC Historical Quotes
Retrieves OTC quotes history. API Key Permissions Required: Orders and trades - Query open orders & trades
Parameters
| Parameter | Type |
|---|---|
params? | { nonce?: number; } |
params.nonce? | number |
Returns
Promise<OTCGetHistoricalQuotesResponse>
getOtcPairs()
getOtcPairs(params?: object): Promise<OTCGetPairsResponse>;Get OTC Pairs
Retrieves the list of OTC trading pairs. API Key Permissions Required: Funds permissions - Query and Funds permissions - Deposit
Parameters
| Parameter | Type |
|---|---|
params? | { nonce?: number; } |
params.nonce? | number |
Returns
Promise<OTCGetPairsResponse>
hasAccessToken()
hasAccessToken(): boolean;Returns
boolean
Inherited from
BaseRestClient.hasAccessToken
listCustodyActivities()
listCustodyActivities(params: CustodyListActivitiesParams): Promise<CustodyListActivitiesResponse>;List activities
Retrieve all activities that match the specified filter criteria.
Parameters
| Parameter | Type |
|---|---|
params | CustodyListActivitiesParams |
Returns
Promise<CustodyListActivitiesResponse>
listCustodyTasks()
listCustodyTasks(params: CustodyListTasksParams): Promise<CustodyListTasksResponse>;List tasks
Retrieve review tasks that match the specified filter criteria.
Parameters
| Parameter | Type |
|---|---|
params | CustodyListTasksParams |
Returns
Promise<CustodyListTasksResponse>
listCustodyTransactions()
listCustodyTransactions(params: CustodyListTransactionsParams): Promise<CustodyListTransactionsResponse>;List custody transactions
Retrieve the transaction history for a specified vault.
Parameters
| Parameter | Type |
|---|---|
params | CustodyListTransactionsParams |
Returns
Promise<CustodyListTransactionsResponse>
listCustodyVaults()
listCustodyVaults(params: CustodyListVaultsParams): Promise<CustodyListVaultsResponse>;List vaults
Retrieve all vaults within the custody domain.
Parameters
| Parameter | Type |
|---|---|
params | CustodyListVaultsParams |
Returns
Promise<CustodyListVaultsResponse>
setAccessToken()
setAccessToken(newAccessToken: string): void;Parameters
| Parameter | Type |
|---|---|
newAccessToken | string |
Returns
void
Inherited from
BaseRestClient.setAccessToken
updateOtcQuote()
updateOtcQuote(params: OTCUpdateQuoteParams): Promise<OTCUpdateQuoteResponse>;Update OTC Quote
Accepts or rejects an OTC quote. API Key Permissions Required: Orders and trades - Create & modify orders
Parameters
| Parameter | Type |
|---|---|
params | OTCUpdateQuoteParams |
Returns
Promise<OTCUpdateQuoteResponse>