<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Cradicle Explorer</title>
    <link href="/css/bootstrap/bootstrap.min.css" rel="stylesheet">
    <style>
      .form-control-dark::placeholder {
          color: #aaa;
          opacity: 1;
      }
    </style>
    <link rel="stylesheet" href="/assets/fontawesome/css/all.min.css">
    <link rel="icon" type="image/png" href="/favicon.png">


                <link href="/css/dashboard.css" rel="stylesheet">
                </head>
                <body>
                <header class="navbar navbar-dark sticky-top bg-dark flex-md-nowrap p-0 shadow">
                  <a class="navbar-brand col-md-3 col-lg-2 me-0 px-3 fs-6" href="/">Cradicle Explorer</a>
                  <button class="navbar-toggler position-absolute d-md-none collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#sidebarMenu" aria-controls="sidebarMenu" aria-expanded="false" aria-label="Toggle navigation">
                    <span class="navbar-toggler-icon"></span>
                  </button>
                  <form method="get" action="/cgi-bin/main" style="width:100%;"><input class="form-control form-control-dark w-100 rounded-0 border-0" type="text" name="q" placeholder="Search repos" aria-label="Search"></form>
                  <div class="navbar-nav flex-row">
                    <div class="nav-item text-nowrap">
                      <a class="nav-link px-3 active" href="/cgi-bin/repo?id=z3NChsyDiwxer2uEABxFrLHuuqYdp">airbyte-custom-connector</a>
                    </div>
                  </div>
                </header>
                <div class="container-fluid">
                  <div class="row">
                    <nav id="sidebarMenu" class="col-md-3 col-lg-2 d-md-block bg-dark sidebar collapse">
                      <div class="position-sticky pt-3 sidebar-sticky">
                        <ul class="nav flex-column">
                          <li class="nav-item">
                            <a class="nav-link" href="/cgi-bin/repo?id=z3NChsyDiwxer2uEABxFrLHuuqYdp">
                              <i class="align-text-bottom fa-solid fa-info"></i>
                              Info
                            </a>
                          </li>
                          <li class="nav-item">
                            <a class="nav-link" href="/cgi-bin/repo?id=z3NChsyDiwxer2uEABxFrLHuuqYdp&issue=list">
                              <i class="align-text-bottom fa-solid fa-layer-group"></i>
                              Issues
                            </a>
                          </li>
                          <li class="nav-item">
                            <a class="nav-link" href="/cgi-bin/repo?id=z3NChsyDiwxer2uEABxFrLHuuqYdp&patch=list">
                              <i class="align-text-bottom fa-solid fa-vest-patches"></i>
                              Patches
                            </a>
                          </li>
                          <li class="nav-item">
                            <a class="nav-link" href="/cgi-bin/repo?id=z3NChsyDiwxer2uEABxFrLHuuqYdp&wallet=list">
                              <i class="align-text-bottom fa-solid fa-wallet"></i>
                              Wallets
                            </a>
                          </li>
                          <li class="nav-item">
                            <a class="nav-link active" href="/cgi-bin/repo?id=z3NChsyDiwxer2uEABxFrLHuuqYdp&source=.">
                              <i class="align-text-bottom fa-solid fa-code"></i>
                              Source
                            </a>
                          </li>
                        <h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted text-uppercase">
                          <span></span>
                        </h6>
                        <ul class="nav flex-column mb-2">
                        
    <h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-1 mb-1 text-muted text-uppercase">
      <span>Source</span>
    </h6>
    <li><a class="nav-link py-0" style="padding-left:16px;" href="/cgi-bin/repo?id=z3NChsyDiwxer2uEABxFrLHuuqYdp&source=.github"><i class="fa-solid fa-folder" style="color:#f0c040;"></i> .github</a></li><li><a class="nav-link py-0" style="padding-left:16px;" href="/cgi-bin/repo?id=z3NChsyDiwxer2uEABxFrLHuuqYdp&source=source-alchemy-fetcher"><i class="fa-solid fa-folder-open" style="color:#f0c040;"></i> source-alchemy-fetcher</a></li><li><a class="nav-link py-0" style="padding-left:32px;" href="/cgi-bin/repo?id=z3NChsyDiwxer2uEABxFrLHuuqYdp&source=source-alchemy-fetcher%2Fsample_files"><i class="fa-solid fa-folder" style="color:#f0c040;"></i> sample_files</a></li><li><a class="nav-link py-0" style="padding-left:32px;" href="/cgi-bin/repo?id=z3NChsyDiwxer2uEABxFrLHuuqYdp&source=source-alchemy-fetcher%2Fsource_alchemy_fetcher"><i class="fa-solid fa-folder" style="color:#f0c040;"></i> source_alchemy_fetcher</a></li><li><a class="nav-link py-0" style="padding-left:32px;" href="/cgi-bin/repo?id=z3NChsyDiwxer2uEABxFrLHuuqYdp&file=source-alchemy-fetcher%2FDockerfile"><i class="fa-solid fa-file" style="color:#888;"></i> Dockerfile</a></li><li><a class="nav-link py-0 active" style="padding-left:32px;" href="/cgi-bin/repo?id=z3NChsyDiwxer2uEABxFrLHuuqYdp&file=source-alchemy-fetcher%2FREADME.md"><i class="fa-solid fa-file" style="color:#888;"></i> README.md</a></li><li><a class="nav-link py-0" style="padding-left:32px;" href="/cgi-bin/repo?id=z3NChsyDiwxer2uEABxFrLHuuqYdp&file=source-alchemy-fetcher%2Fmain.py"><i class="fa-solid fa-file" style="color:#888;"></i> main.py</a></li><li><a class="nav-link py-0" style="padding-left:32px;" href="/cgi-bin/repo?id=z3NChsyDiwxer2uEABxFrLHuuqYdp&file=source-alchemy-fetcher%2Fmetadata.yaml"><i class="fa-solid fa-file" style="color:#888;"></i> metadata.yaml</a></li><li><a class="nav-link py-0" style="padding-left:32px;" href="/cgi-bin/repo?id=z3NChsyDiwxer2uEABxFrLHuuqYdp&file=source-alchemy-fetcher%2Frequirements.txt"><i class="fa-solid fa-file" style="color:#888;"></i> requirements.txt</a></li><li><a class="nav-link py-0" style="padding-left:32px;" href="/cgi-bin/repo?id=z3NChsyDiwxer2uEABxFrLHuuqYdp&file=source-alchemy-fetcher%2Fsetup.py"><i class="fa-solid fa-file" style="color:#888;"></i> setup.py</a></li><li><a class="nav-link py-0" style="padding-left:16px;" href="/cgi-bin/repo?id=z3NChsyDiwxer2uEABxFrLHuuqYdp&source=source-app-store"><i class="fa-solid fa-folder" style="color:#f0c040;"></i> source-app-store</a></li><li><a class="nav-link py-0" style="padding-left:16px;" href="/cgi-bin/repo?id=z3NChsyDiwxer2uEABxFrLHuuqYdp&source=source-basic-api-fetcher"><i class="fa-solid fa-folder" style="color:#f0c040;"></i> source-basic-api-fetcher</a></li><li><a class="nav-link py-0" style="padding-left:16px;" href="/cgi-bin/repo?id=z3NChsyDiwxer2uEABxFrLHuuqYdp&source=source-bitcoin-explorer"><i class="fa-solid fa-folder" style="color:#f0c040;"></i> source-bitcoin-explorer</a></li><li><a class="nav-link py-0" style="padding-left:16px;" href="/cgi-bin/repo?id=z3NChsyDiwxer2uEABxFrLHuuqYdp&source=source-blockchain-explorer"><i class="fa-solid fa-folder" style="color:#f0c040;"></i> source-blockchain-explorer</a></li><li><a class="nav-link py-0" style="padding-left:16px;" href="/cgi-bin/repo?id=z3NChsyDiwxer2uEABxFrLHuuqYdp&source=source-bluesky-fetcher"><i class="fa-solid fa-folder" style="color:#f0c040;"></i> source-bluesky-fetcher</a></li><li><a class="nav-link py-0" style="padding-left:16px;" href="/cgi-bin/repo?id=z3NChsyDiwxer2uEABxFrLHuuqYdp&source=source-crypto-market-extractor"><i class="fa-solid fa-folder" style="color:#f0c040;"></i> source-crypto-market-extractor</a></li><li><a class="nav-link py-0" style="padding-left:16px;" href="/cgi-bin/repo?id=z3NChsyDiwxer2uEABxFrLHuuqYdp&source=source-custom-bamboo-hr"><i class="fa-solid fa-folder" style="color:#f0c040;"></i> source-custom-bamboo-hr</a></li><li><a class="nav-link py-0" style="padding-left:16px;" href="/cgi-bin/repo?id=z3NChsyDiwxer2uEABxFrLHuuqYdp&source=source-custom-rss-feed"><i class="fa-solid fa-folder" style="color:#f0c040;"></i> source-custom-rss-feed</a></li><li><a class="nav-link py-0" style="padding-left:16px;" href="/cgi-bin/repo?id=z3NChsyDiwxer2uEABxFrLHuuqYdp&source=source-discord-fetcher"><i class="fa-solid fa-folder" style="color:#f0c040;"></i> source-discord-fetcher</a></li><li><a class="nav-link py-0" style="padding-left:16px;" href="/cgi-bin/repo?id=z3NChsyDiwxer2uEABxFrLHuuqYdp&source=source-discourse-fetcher"><i class="fa-solid fa-folder" style="color:#f0c040;"></i> source-discourse-fetcher</a></li><li><a class="nav-link py-0" style="padding-left:16px;" href="/cgi-bin/repo?id=z3NChsyDiwxer2uEABxFrLHuuqYdp&source=source-etherscan"><i class="fa-solid fa-folder" style="color:#f0c040;"></i> source-etherscan</a></li><li><a class="nav-link py-0" style="padding-left:16px;" href="/cgi-bin/repo?id=z3NChsyDiwxer2uEABxFrLHuuqYdp&source=source-google-store"><i class="fa-solid fa-folder" style="color:#f0c040;"></i> source-google-store</a></li><li><a class="nav-link py-0" style="padding-left:16px;" href="/cgi-bin/repo?id=z3NChsyDiwxer2uEABxFrLHuuqYdp&source=source-luma-fetcher"><i class="fa-solid fa-folder" style="color:#f0c040;"></i> source-luma-fetcher</a></li><li><a class="nav-link py-0" style="padding-left:16px;" href="/cgi-bin/repo?id=z3NChsyDiwxer2uEABxFrLHuuqYdp&source=source-mastodon-fetcher"><i class="fa-solid fa-folder" style="color:#f0c040;"></i> source-mastodon-fetcher</a></li><li><a class="nav-link py-0" style="padding-left:16px;" href="/cgi-bin/repo?id=z3NChsyDiwxer2uEABxFrLHuuqYdp&source=source-reddit-fetcher"><i class="fa-solid fa-folder" style="color:#f0c040;"></i> source-reddit-fetcher</a></li><li><a class="nav-link py-0" style="padding-left:16px;" href="/cgi-bin/repo?id=z3NChsyDiwxer2uEABxFrLHuuqYdp&source=source-simplecast-fecther"><i class="fa-solid fa-folder" style="color:#f0c040;"></i> source-simplecast-fecther</a></li><li><a class="nav-link py-0" style="padding-left:16px;" href="/cgi-bin/repo?id=z3NChsyDiwxer2uEABxFrLHuuqYdp&source=source-telegram-fetcher"><i class="fa-solid fa-folder" style="color:#f0c040;"></i> source-telegram-fetcher</a></li><li><a class="nav-link py-0" style="padding-left:16px;" href="/cgi-bin/repo?id=z3NChsyDiwxer2uEABxFrLHuuqYdp&source=source-twitter-ads"><i class="fa-solid fa-folder" style="color:#f0c040;"></i> source-twitter-ads</a></li><li><a class="nav-link py-0" style="padding-left:16px;" href="/cgi-bin/repo?id=z3NChsyDiwxer2uEABxFrLHuuqYdp&source=source-twitter-fetcher"><i class="fa-solid fa-folder" style="color:#f0c040;"></i> source-twitter-fetcher</a></li><li><a class="nav-link py-0" style="padding-left:16px;" href="/cgi-bin/repo?id=z3NChsyDiwxer2uEABxFrLHuuqYdp&source=source-youtube-fetcher"><i class="fa-solid fa-folder" style="color:#f0c040;"></i> source-youtube-fetcher</a></li><li><a class="nav-link py-0" style="padding-left:16px;" href="/cgi-bin/repo?id=z3NChsyDiwxer2uEABxFrLHuuqYdp&file=.editorconfig"><i class="fa-solid fa-file" style="color:#888;"></i> .editorconfig</a></li><li><a class="nav-link py-0" style="padding-left:16px;" href="/cgi-bin/repo?id=z3NChsyDiwxer2uEABxFrLHuuqYdp&file=.gitignore"><i class="fa-solid fa-file" style="color:#888;"></i> .gitignore</a></li><li><a class="nav-link py-0" style="padding-left:16px;" href="/cgi-bin/repo?id=z3NChsyDiwxer2uEABxFrLHuuqYdp&file=Jenkinsfile"><i class="fa-solid fa-file" style="color:#888;"></i> Jenkinsfile</a></li><li><a class="nav-link py-0" style="padding-left:16px;" href="/cgi-bin/repo?id=z3NChsyDiwxer2uEABxFrLHuuqYdp&file=README.md"><i class="fa-solid fa-file" style="color:#888;"></i> README.md</a></li><li><a class="nav-link py-0" style="padding-left:16px;" href="/cgi-bin/repo?id=z3NChsyDiwxer2uEABxFrLHuuqYdp&file=flake.nix"><i class="fa-solid fa-file" style="color:#888;"></i> flake.nix</a></li>
    
                        </ul>
                      </div>
                    </nav>
                <main class="col-md-9 ms-sm-auto col-lg-10">
                  <div class="container px-1 py-3">
        
<div class="mb-2" style="font-size:1.1rem;"><a href="/cgi-bin/repo?id=z3NChsyDiwxer2uEABxFrLHuuqYdp&source=.">/</a> <a href="/cgi-bin/repo?id=z3NChsyDiwxer2uEABxFrLHuuqYdp&source=source-alchemy-fetcher">source-alchemy-fetcher</a> / README.md</div>
        <div class="list-group">
        <div class="list-group-item">
        <div class="mb-2" style="font-weight:bold;"><i class="fa-solid fa-file"></i> README.md</div>
        <pre style="margin:0; font-size:0.85rem; overflow-x:auto; color:#fafafa;"><span style="color:#666; user-select:none;">  1</span>  # Alchemy Source
<span style="color:#666; user-select:none;">  2</span>  
<span style="color:#666; user-select:none;">  3</span>  ## Usage
<span style="color:#666; user-select:none;">  4</span>  
<span style="color:#666; user-select:none;">  5</span>  This connector fetches historical prices from [Alchemy](https://www.alchemy.com/).
<span style="color:#666; user-select:none;">  6</span>  
<span style="color:#666; user-select:none;">  7</span>  ### Configuration
<span style="color:#666; user-select:none;">  8</span>  
<span style="color:#666; user-select:none;">  9</span>  The connector takes the following input:
<span style="color:#666; user-select:none;"> 10</span>  
<span style="color:#666; user-select:none;"> 11</span>  - `api_key` - the [Alchemy](https://www.alchemy.com/) API key.
<span style="color:#666; user-select:none;"> 12</span>  - `tokens` - there are two different `payload` implementations:
<span style="color:#666; user-select:none;"> 13</span>    - [Symbol](https://www.alchemy.com/docs/data/prices-api/prices-api-endpoints/prices-api-endpoints/get-historical-token-prices#request.body.PricesApiEndpointsGetHistoricalTokenPricesRequest0) - requires `symbol` and `interval`.
<span style="color:#666; user-select:none;"> 14</span>    - [Address](https://www.alchemy.com/docs/data/prices-api/prices-api-endpoints/prices-api-endpoints/get-historical-token-prices#request.body.PricesApiEndpointsGetHistoricalTokenPricesRequest1) - requires `network`, `address`, `symbol` and `interval`.
<span style="color:#666; user-select:none;"> 15</span>  
<span style="color:#666; user-select:none;"> 16</span>  #### Token Setup
<span style="color:#666; user-select:none;"> 17</span>  
<span style="color:#666; user-select:none;"> 18</span>  Symbol example:
<span style="color:#666; user-select:none;"> 19</span>  
<span style="color:#666; user-select:none;"> 20</span>  ```json
<span style="color:#666; user-select:none;"> 21</span>  {
<span style="color:#666; user-select:none;"> 22</span>      &quot;symbol&quot;: &quot;BTC&quot;,
<span style="color:#666; user-select:none;"> 23</span>      &quot;interval&quot;: &quot;5m&quot;
<span style="color:#666; user-select:none;"> 24</span>  }
<span style="color:#666; user-select:none;"> 25</span>  ```
<span style="color:#666; user-select:none;"> 26</span>  
<span style="color:#666; user-select:none;"> 27</span>  Address example:
<span style="color:#666; user-select:none;"> 28</span>  
<span style="color:#666; user-select:none;"> 29</span>  ```json
<span style="color:#666; user-select:none;"> 30</span>  {
<span style="color:#666; user-select:none;"> 31</span>      &quot;network&quot;: &quot;opt-mainnet&quot;,
<span style="color:#666; user-select:none;"> 32</span>      &quot;address&quot;: &quot;0x4200000000000000000000000000000000000042&quot;,
<span style="color:#666; user-select:none;"> 33</span>      &quot;symbol&quot;: &quot;OP&quot;,
<span style="color:#666; user-select:none;"> 34</span>      &quot;interval&quot;: &quot;1d&quot;
<span style="color:#666; user-select:none;"> 35</span>  }
<span style="color:#666; user-select:none;"> 36</span>  ```
<span style="color:#666; user-select:none;"> 37</span>  
<span style="color:#666; user-select:none;"> 38</span>  **Notes**:
<span style="color:#666; user-select:none;"> 39</span>  
<span style="color:#666; user-select:none;"> 40</span>  - `interval` - can be `5m`, `1h`, `1d`. [Range calculations](https://www.alchemy.com/docs/data/prices-api/prices-api-endpoints/prices-api-endpoints/get-historical-token-prices#request.body.PricesApiEndpointsGetHistoricalTokenPricesRequest0.interval) are automatically done in the stream slices.
<span style="color:#666; user-select:none;"> 41</span>  - `start_date` and `end_date` can be used for backfills. Once a backfill is completed, they can be left blank. The prices for the given `interval` will be fetched for the previous day automatically.
<span style="color:#666; user-select:none;"> 42</span>  
<span style="color:#666; user-select:none;"> 43</span>  ### Output
<span style="color:#666; user-select:none;"> 44</span>  
<span style="color:#666; user-select:none;"> 45</span>  The connector will return the following:
<span style="color:#666; user-select:none;"> 46</span>  
<span style="color:#666; user-select:none;"> 47</span>  * [HistoricalRates](./source_alchemy_fetcher/schemas/historical_rates.json)
<span style="color:#666; user-select:none;"> 48</span>  
<span style="color:#666; user-select:none;"> 49</span>  ## Local development
<span style="color:#666; user-select:none;"> 50</span>  
<span style="color:#666; user-select:none;"> 51</span>  ### Prerequisites
<span style="color:#666; user-select:none;"> 52</span>  
<span style="color:#666; user-select:none;"> 53</span>  #### Activate Virtual Environment and install dependencies
<span style="color:#666; user-select:none;"> 54</span>  
<span style="color:#666; user-select:none;"> 55</span>  From this connector directory, create a virtual environment:
<span style="color:#666; user-select:none;"> 56</span>  
<span style="color:#666; user-select:none;"> 57</span>  ```
<span style="color:#666; user-select:none;"> 58</span>  python -m venv .venv
<span style="color:#666; user-select:none;"> 59</span>  ```
<span style="color:#666; user-select:none;"> 60</span>  
<span style="color:#666; user-select:none;"> 61</span>  ```
<span style="color:#666; user-select:none;"> 62</span>  source .venv/bin/activate
<span style="color:#666; user-select:none;"> 63</span>  pip install -r requirements.txt
<span style="color:#666; user-select:none;"> 64</span>  ```
<span style="color:#666; user-select:none;"> 65</span>  
<span style="color:#666; user-select:none;"> 66</span>  ### Locally running the connector
<span style="color:#666; user-select:none;"> 67</span>  
<span style="color:#666; user-select:none;"> 68</span>  ```
<span style="color:#666; user-select:none;"> 69</span>  python main.py spec
<span style="color:#666; user-select:none;"> 70</span>  python main.py check --config sample_files/config-example.json
<span style="color:#666; user-select:none;"> 71</span>  python main.py discover --config sample_files/config-example.json
<span style="color:#666; user-select:none;"> 72</span>  python main.py read --config sample_files/config-example.json --catalog sample_files/configured_catalog.json
<span style="color:#666; user-select:none;"> 73</span>  ```
<span style="color:#666; user-select:none;"> 74</span>  
<span style="color:#666; user-select:none;"> 75</span>  ### Locally running the connector docker image
<span style="color:#666; user-select:none;"> 76</span>  
<span style="color:#666; user-select:none;"> 77</span>  ```bash
<span style="color:#666; user-select:none;"> 78</span>  docker build -t airbyte/source-alchemy-fetcher:dev .
<span style="color:#666; user-select:none;"> 79</span>  # Running the spec command against your patched connector
<span style="color:#666; user-select:none;"> 80</span>  docker run airbyte/source-alchemy-fetcher:dev spec
<span style="color:#666; user-select:none;"> 81</span>  ```
<span style="color:#666; user-select:none;"> 82</span>  
<span style="color:#666; user-select:none;"> 83</span>  #### Run
<span style="color:#666; user-select:none;"> 84</span>  
<span style="color:#666; user-select:none;"> 85</span>  Then run any of the connector commands as follows:
<span style="color:#666; user-select:none;"> 86</span>  
<span style="color:#666; user-select:none;"> 87</span>  #### Linux / MAC OS
<span style="color:#666; user-select:none;"> 88</span>  
<span style="color:#666; user-select:none;"> 89</span>  ```
<span style="color:#666; user-select:none;"> 90</span>  docker run --rm airbyte/source-alchemy-fetcher:dev spec
<span style="color:#666; user-select:none;"> 91</span>  docker run --rm -v $(pwd)/sample_files:/sample_files airbyte/source-alchemy-fetcher:dev check --config /sample_files/config-example.json
<span style="color:#666; user-select:none;"> 92</span>  docker run --rm -v $(pwd)/sample_files:/sample_files airbyte/source-alchemy-fetcher:dev discover --config /sample_files/config-example.json
<span style="color:#666; user-select:none;"> 93</span>  docker run --rm -v $(pwd)/sample_files:/sample_files airbyte/source-alchemy-fetcher:dev read --config /sample_files/config-example.json --catalog /sample_files/configured_catalog.json  
<span style="color:#666; user-select:none;"> 94</span>  ```
<span style="color:#666; user-select:none;"> 95</span>  
<span style="color:#666; user-select:none;"> 96</span>  #### Windows
<span style="color:#666; user-select:none;"> 97</span>  
<span style="color:#666; user-select:none;"> 98</span>  ```
<span style="color:#666; user-select:none;"> 99</span>  docker run --rm airbyte/source-alchemy-fetcher:dev spec
<span style="color:#666; user-select:none;">100</span>  docker run --rm -v &quot;$PWD\sample_files:/sample_files&quot; airbyte/source-alchemy-fetcher:dev check --config /sample_files/config-example.json
<span style="color:#666; user-select:none;">101</span>  docker run --rm -v &quot;$PWD\sample_files:/sample_files&quot; airbyte/source-alchemy-fetcher:dev discover --config /sample_files/config-example.json
<span style="color:#666; user-select:none;">102</span>  docker run --rm -v &quot;$PWD\sample_files:/sample_files&quot; airbyte/source-alchemy-fetcher:dev read --config /sample_files/config-example.json --catalog /sample_files/configured_catalog.json
<span style="color:#666; user-select:none;">103</span>  ```
</pre>
        </div>
        </div>

</div>
</main>
</div>
</div>


</body>
</html>

