# Access Trading Signals Programmatically

By [SHPRD](https://paragraph.com/@shprd-2) · 2023-08-25

---

**Dear all,**

As promised, you will find below the technical documentation on programmatic access to shprd trading signals. 👩‍💻👨‍💻

1\. Request a message to sign
-----------------------------

In a terminal shell (like Iterm) or on postman:

    curl --location --request POST 'https://0lii8gygqg.execute-api.eu-west-3.amazonaws.com/prod/auth/<the_address_holding_your_NPXs>/message' \
    --header 'Content-Type: application/json' \
    --data-raw '{
        "uri": "https://signals.shprd.finance",
        "version": "v0.1.180",
        "maxTs": "2023-07-06T12:21:22.123",
        "chainId": 1,
        "app": "signals.shprd.finance"
    }' 
    

*   Replace each <\*key\*> with appropriate value:
    
    *     
        
    
    *   Version: see latest version on cf.app.shprd.finance, at bottom-left of the screen
        
    *   ChainId integer can be either 1 (mainnet) or 56 (bsc)
        
*   This POST request will return:
    
        {
          message: string;
          id: string;
          error: string;
        }
        
    
    2\. Sign the message
    --------------------
    
    Go on [https://www.myetherwallet.com/wallet/sign](https://www.myetherwallet.com/wallet/sign)
    
    \> Select Browser extension
    
    \> Enter the message received above and replace all \\n by new lines (it should look like as in below screenshot)
    
    ![Inside the input field, replace all ](https://storage.googleapis.com/papyrus_images/a571fa86f7977ac8a21cc3ca594307d47e7dc5d4278945bd716fda6ae11eb44c.png)
    
    Inside the input field, replace all
    
    \> Click on Sign button
    
    ![Signing with your wallet address will generate the signature. Copy and paste it](https://storage.googleapis.com/papyrus_images/1431d26887cac17e5d10f7968eeaafc6791190e30b949b56e07ccc72e6d64dc6.png)
    
    Signing with your wallet address will generate the signature. Copy and paste it
    
    3\. Retrieve a JSON Web Token (JWT)
    -----------------------------------
    
    In a shell (like Iterm) or on postman:
    
        curl --location --request POST 'https://0lii8gygqg.execute-api.eu-west-3.amazonaws.com/prod/auth/<the_address_holding_your_NPXs>/verify' \
        --header 'Content-Type: application/json' \
        --data-raw '{
            "id": "<id>",
            "signature": "<signature>",
            "chainId": 1
        }'
        
    
    *   Replace each with appropriate value: **Prefix the signature value (“sig”) with “0x”** This POST request will return: { verified: boolean; jwt: string; chainId: number; balance (in NPXs): number; error: string; } 4. Access signals with the JWT In a shell (like Iterm) or on postman: curl --location --request POST 'https://0lii8gygqg.execute-api.eu-west-3.amazonaws.com/prod/strats/signals/filter' \\ --header 'Authorization: Bearer <JWT>' \\ --header 'Content-Type: application/json' \\ --data-raw '{ "strategies": \[ { "code": "STRAT\_BTC\_ETH\_USD\_LO\_H\_1", "underlyingCurrencies": \["ETH", "BTC"\] } \], "minTs": "2023-07-29T12:13:14.123", "maxTs": "2023-08-19T12:13:14.123" }' Replace each <\*key\*> with appropriate value: List of available strategies: STRAT\_BTC\_ETH\_USD\_LO\_H\_1 STRAT\_XRP\_USD\_D\_1 STRAT\_ETH\_USD\_D\_3 STRAT\_BTC\_USD\_D\_3 STRAT\_BNB\_USD\_LO\_D\_1\_V2 STRAT\_BTC\_USD\_H\_4\_V2 STRAT\_ETH\_USD\_H\_3\_V2 STRAT\_ETH\_USD\_H\_4\_V2 STRAT\_BTC\_ETH\_USD\_H\_1 STRAT\_DOGE\_USD\_LO\_D\_1 STRAT\_MATIC\_USD\_LO\_D\_1 STRAT\_SOL\_USD\_LO\_D\_1 STRAT\_AI\_TOP\_3\_PERFORMERS\_H\_1 NB: strategy codes are also displayed in the URL of each strategy’s details page on [https://signals.shprd.finance/](https://signals.shprd.finance/). Finally, this POST request will return: { success: boolean, data: \[\], <- the signals offset: number, error: string } _The Shprd Team_

---

*Originally published on [SHPRD](https://paragraph.com/@shprd-2/access-trading-signals-programmatically)*
