# Remove backslash from json string c# (Error 859)

**URL:** https://community.bitquery.io/t/remove-backslash-from-json-string-c-error-859/1167
**Category:** GraphQL API
**Tags:** api, error
**Created:** [August 12, 2022, 1:54pm UTC](https://community.bitquery.io/t/remove-backslash-from-json-string-c-error-859/1167 "2022-08-12T13:54:26Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![tifa](https://avatars.discourse-cdn.com/v4/letter/t/c6cbf5/32.png) [@tifa](https://community.bitquery.io/u/tifa)
#### Post date: [August 12, 2022, 1:54pm UTC](https://community.bitquery.io/t/remove-backslash-from-json-string-c-error-859/1167/1 "2022-08-12T13:54:27Z")

</div>

i try to send api call, But I get an error

this is my code

```auto
static async Task Main()
    {
        string query = @"query MyQuery {ethereum(network: bsc) {transfers(currency: {is: ""0x2170ed0880ac9a755fd29b2688956bd959f933f8""} success: true options: { desc:""amount"", offset: 0, limit: 3}) {receiver {uniq: address} amount} } }";

        var data = new StringContent(query, Encoding.Default, "application/json");

        var url = "https://graphql.bitquery.io";

        using var client = new HttpClient();

        client.DefaultRequestHeaders.Add("X-API-KEY", "***";
        var response = await client.PostAsync(url, data);

        var res = response.Content.ReadAsStringAsync().Result;

        Console.WriteLine(res);
    }

```

and server risponce is

 ![r](https://us1.discourse-cdn.com/flex016/uploads/bitquery/original/1X/ad02e8f7f4d7481015665f274be964c639998d12.png)

---

<div class="post-metadata">

### Author: ![bitquery-support](https://avatars.discourse-cdn.com/v4/letter/b/71c47a/32.png) [@bitquery-support](https://community.bitquery.io/u/bitquery-support)
#### Post date: [August 13, 2022, 5:33am UTC](https://community.bitquery.io/t/remove-backslash-from-json-string-c-error-859/1167/2 "2022-08-13T05:33:53Z")

</div>

Hello, try something like this!

```cs
static async Task Main()
    {
        string query = @"query MyQuery {ethereum(network: bsc) {transfers(currency: {is: \"0x2170ed0880ac9a755fd29b2688956bd959f933f8"\} success: true options: { desc:\"amount"\, offset: 0, limit: 3}) {receiver {uniq: address} amount} } }";

        var data = new StringContent(query, Encoding.Default, "application/json");

        var url = "https://graphql.bitquery.io";

        using var client = new HttpClient();

        client.DefaultRequestHeaders.Add("API-KEY", "***");
        var response = await client.PostAsync(url, data);

        var res = response.Content.ReadAsStringAsync().Result;

        Console.WriteLine(res);
    }

```

note that it is better to use double quotation marks

---

<div class="post-metadata">

### Author: ![tifa](https://avatars.discourse-cdn.com/v4/letter/t/c6cbf5/32.png) [@tifa](https://community.bitquery.io/u/tifa)
#### Post date: [August 13, 2022, 12:15pm UTC](https://community.bitquery.io/t/remove-backslash-from-json-string-c-error-859/1167/3 "2022-08-13T12:15:28Z")

</div>

Hi  
The result is the same for ( "" ) and ( \" )

---

<div class="post-metadata">

### Author: ![bitquery-support](https://avatars.discourse-cdn.com/v4/letter/b/71c47a/32.png) [@bitquery-support](https://community.bitquery.io/u/bitquery-support)
#### Post date: [August 14, 2022, 3:46am UTC](https://community.bitquery.io/t/remove-backslash-from-json-string-c-error-859/1167/4 "2022-08-14T03:46:51Z")

</div>

I have no knowledge in c# to help you deeply, but what I can assure you is that there is no error on the part of bitquery, the query works correctly

---

<div class="post-metadata">

### Author: ![gaurav](https://avatars.discourse-cdn.com/v4/letter/g/b487fb/32.png) [@gaurav](https://community.bitquery.io/u/gaurav)
#### Post date: [August 16, 2022, 10:46am UTC](https://community.bitquery.io/t/remove-backslash-from-json-string-c-error-859/1167/5 "2022-08-16T10:46:35Z")

</div>

We have launched “Code Snippet” So now you can get code for your query from IDE.

 ![Get code from your query](https://us1.discourse-cdn.com/flex016/uploads/bitquery/original/1X/ca738bcd6152538f0ff12deac22554877d97a7b9.jpeg)
