# API

Base URL: [http://coinsight.herokuapp.com/](http://coinsight.herokuapp.com/api/kucoin/margin/current)

#### Endpoints

**/api/kucoin/margin/currencies**\
\
Gets the Currencies available for Margin Trading on the Kucoin Exchange.

Returns: \[\<coin>,...]

**/api/kucoin/margin/current**\
\
Gets the Current Marginal rates. Queries from the latest data on the Google BigQuery Database.

Parameters:

<table><thead><tr><th width="124">Name</th><th width="114">Required</th><th width="109">Default</th><th>Description</th></tr></thead><tbody><tr><td>threshold</td><td>No</td><td>2000</td><td>Dollar value for the loans to consider when calculating the interest rates</td></tr></tbody></table>

* threshold (optional - default: 2000)
  * Dollar value for the loans to consider when calculating the interest rates

Returns:&#x20;

\[\[\<coin>,\<dailyIntRate>],...]

**/api/kucoin/margin/historical**\
\
Gets the Historical marginal interest rates on Kucoin Exchange over the last 7 days

Parameters:

<table><thead><tr><th width="124">Name</th><th width="114">Required</th><th width="109">Default</th><th>Description</th></tr></thead><tbody><tr><td>coin</td><td>No</td><td>BTC</td><td>cryptocurrency to query</td></tr><tr><td>threshold</td><td>No</td><td>1</td><td>Amount of coins to consider when calculating interest rate</td></tr></tbody></table>

**Returns:** \
\
\[{"dailyIntRate":\<dailyIntRate>,"timestamp":\<timestamp>},...]

\\
