mirror of
https://github.com/FlipsideCrypto/gitbook.git
synced 2026-02-06 10:47:06 +00:00
GITBOOK-543: Update API page link
This commit is contained in:
parent
187cc6063a
commit
cdc84ffb4a
@ -14,7 +14,7 @@ Analyze blockchain data with Snowflake SQL, create visualizations, and show off
|
||||
**Ideal for analysts:** Exploratory Data Analysis (EDA), growing your [analyst brand](https://flipsidecrypto.xyz/discover/analysts), building in public.
|
||||
|
||||
\
|
||||
[🛠️](https://emojipedia.org/hammer-and-wrench) [**AP**](https://flipsidecrypto.xyz/account/api-keys)[**I & SDK**](https://flipsidecrypto.xyz/settings/api-keys)\
|
||||
[🛠️](https://emojipedia.org/hammer-and-wrench) [**API & SDK**](https://flipsidecrypto.xyz/settings/api)\
|
||||
Generate an API key to submit queries directly from your dev or data science environment.\
|
||||
\
|
||||
**Ideal for builders:** Models, forecasts, or custom apps built in R, Python, React, or similar.
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Run Your First Query
|
||||
|
||||
This tutorial assumes you have already signed up for a Flipside Account and generated an API key [here in Flipside's Data Studio](https://flipsidecrypto.xyz/account/api-keys). 
|
||||
This tutorial assumes you have already signed up for a Flipside Account and generated an API key [here in Flipside's Data Studio](https://flipsidecrypto.xyz/settings/api).
|
||||
|
||||
### 1. Install the SDK (or skip to #2 if using the API directly)
|
||||
|
||||
@ -38,10 +38,11 @@ install.packages("shroomDK") # from CRAN
|
||||
|
||||
{% tabs %}
|
||||
{% tab title="Python SDK" %}
|
||||
<pre class="language-python"><code class="lang-python">from flipside import Flipside
|
||||
```python
|
||||
from flipside import Flipside
|
||||
|
||||
# Initialize `Flipside` with your API Key and API Url
|
||||
flipside = Flipside("<YOUR_API_KEY>", "https://api-v2.flipsidecrypto.xyz")
|
||||
flipside = Flipside("<YOUR_API_KEY>", "https://api-v2.flipsidecrypto.xyz")
|
||||
|
||||
sql = """
|
||||
SELECT
|
||||
@ -51,10 +52,10 @@ FROM ethereum.core.fact_transactions
|
||||
WHERE block_timestamp >= GETDATE() - interval'7 days'
|
||||
GROUP BY 1
|
||||
"""
|
||||
<strong>
|
||||
</strong># Run the query against Flipside's query engine and await the results
|
||||
|
||||
# Run the query against Flipside's query engine and await the results
|
||||
query_result_set = flipside.query(sql)
|
||||
</code></pre>
|
||||
```
|
||||
{% endtab %}
|
||||
|
||||
{% tab title="JS/TS/Node SDK" %}
|
||||
@ -82,8 +83,8 @@ const queryResultSet = await flipside.query.run({sql: sql});
|
||||
|
||||
{% tab title="R SDK" %}
|
||||
<pre><code><strong>library(shroomDK)
|
||||
</strong><strong>
|
||||
</strong><strong>api_key = readLines("api_key.txt") # always gitignore your API keys!
|
||||
</strong>
|
||||
<strong>api_key = readLines("api_key.txt") # always gitignore your API keys!
|
||||
</strong>
|
||||
query <- {
|
||||
"
|
||||
@ -213,7 +214,5 @@ page_count = 2
|
||||
# combine into a single data frame.
|
||||
results <- do.call(rbind.data.frame, results)
|
||||
```
|
||||
|
||||
|
||||
{% endtab %}
|
||||
{% endtabs %}
|
||||
|
||||
@ -10,7 +10,7 @@ description: >-
|
||||
|
||||
### 1. 🔑 Get Your Key
|
||||
|
||||
Go to the [Flipside Data Studio](https://flipsidecrypto.xyz/settings/api-keys) and click "API" to generate your API key. Every account comes with 5000 free query seconds per month.
|
||||
Go to the [Flipside Data Studio](https://flipsidecrypto.xyz/settings/api) and click "API" to generate your API key. Every account comes with 5000 free query seconds per month.
|
||||
|
||||
### 2. 🛠 Pick Your SDK and Install It
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user