# Pump Fun Api and Python Request issue

**URL:** https://community.bitquery.io/t/pump-fun-api-and-python-request-issue/2041
**Category:** GraphQL API
**Created:** [August 23, 2024, 1:54am UTC](https://community.bitquery.io/t/pump-fun-api-and-python-request-issue/2041 "2024-08-23T01:54:38Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![scotsoradis121](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@scotsoradis121](https://community.bitquery.io/u/scotsoradis121)
#### Post date: [August 23, 2024, 1:54am UTC](https://community.bitquery.io/t/pump-fun-api-and-python-request-issue/2041/1 "2024-08-23T01:54:38Z")

</div>

Hello this is my first time using bitquery and I was having some errors with my request function. Sorry I know this is probably a very trivial error if any one can spot it that would be much appreciated. When I run the python code I get this response {“data”:null,“errors”:[{“message”:“Cannot query field "Solana" on type "RootQuery".”,“locations”:[{“line”:3,“column”:9}]}]}

how can I get it to properly return the top coins on pump fun on solana ?

```auto
import requests
import json

def request():
    access_token = 'myRealApiKeyHere'

    # Step 2: Make Streaming API query
    url_graphql = "https://streaming.bitquery.io/graphql"
    headers_graphql = {
        'Content-Type': 'application/json',
        'Authorization': f'Bearer {access_token}'
    }

    graphql_query = '''
    {
        Solana {
            DEXTrades(
                limitBy: {
                    by: Trade_Buy_Currency_MintAddress
                    count: 1
                }
                orderBy: { descending: Trade_Buy_Price }
                where: {
                    Trade: { Dex: { ProtocolName: { is: "pump" } } }
                    Buy: {
                        Currency: {
                            MintAddress: {
                                notIn: ["11111111111111111111111111111111"]
                            }
                        }
                    }
                    Transaction: { Result: { Success: true } }
                }
            ) {
                Trade {
                    Buy {
                        Price
                        PriceInUSD
                        Currency {
                            Name
                            Symbol
                            MintAddress
                            Decimals
                            Fungible
                            Uri
                        }
                    }
                }
            }
        }
    }
    '''

    payload_graphql = json.dumps({'query': graphql_query})

    # Step 3: Make request to Streaming API
    response_graphql = requests.post(url_graphql, headers=headers_graphql, data=payload_graphql)

    # Print the response
    print(response_graphql.text)

request()

```

---

<div class="post-metadata">

### Author: ![Divya](https://avatars.discourse-cdn.com/v4/letter/d/13edae/32.png) [@Divya](https://community.bitquery.io/u/Divya)
#### Post date: [August 23, 2024, 6:16am UTC](https://community.bitquery.io/t/pump-fun-api-and-python-request-issue/2041/3 "2024-08-23T06:16:30Z")

</div>

@scotsoradis121 url should be `https://streaming.bitquery.io/eap`

---

<div class="post-metadata">

### Author: ![scotsoradis121](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@scotsoradis121](https://community.bitquery.io/u/scotsoradis121)
#### Post date: [August 23, 2024, 10:11pm UTC](https://community.bitquery.io/t/pump-fun-api-and-python-request-issue/2041/4 "2024-08-23T22:11:08Z")

</div>

> [@Divya](#):
>
> [https://streaming.bitquery.io/eap](https://streaming.bitquery.io/eap)

thanks for the suggestion it worked
