---
id: "M:cAlgo.API.Http.Get(System.Uri)"
kind: "method"
type: "T:cAlgo.API.Http"
url: "https://help.ctrader.com/ctrader-algo/references/HTTP/Http/Get/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# Http.Get

Member of [Http](https://help.ctrader.com/ctrader-algo/references/HTTP/Http/index.md).

## Get(Uri uri)

Performs a GET request to the specified URI.

Environments: Desktop supported · CLI supported · Cloud not supported.

- Cloud: No request is sent. The response, or the callback, has IsSuccessful false, StatusCode 403 and Body null. No exception is thrown.

C#:

```csharp
HttpResponse Get(Uri uri)
```

Python:

```python
api.Http.Get(uri: Uri) -> HttpResponse
```

### Parameters

- `uri` (`Uri`, Python `Uri`): The URI that the GET request should be made to.

### Returns

`HttpResponse` — The `HttpResponse` object representing the result of the request.

### Examples

C#:

```csharp
var response = Http.Get(new Uri("https://api.example.com/quotes/EURUSD"));
if (response.IsSuccessful)
    Print(response.Body);
else
    Print("Request failed with status code {0}", response.StatusCode);
```

Python:

```python
from System import Uri

response = api.Http.Get(Uri("https://api.example.com/quotes/EURUSD"))
if response.IsSuccessful:
    api.Print(response.Body)
else:
    api.Print(f"Request failed with status code {response.StatusCode}")
```

## Get(string uri)

Performs a GET request to the specified URI.

Environments: Desktop supported · CLI supported · Cloud not supported.

- Cloud: No request is sent. The response, or the callback, has IsSuccessful false, StatusCode 403 and Body null. No exception is thrown.

C#:

```csharp
HttpResponse Get(string uri)
```

Python:

```python
api.Http.Get(uri: str) -> HttpResponse
```

### Parameters

- `uri` (`string`, Python `str`): The string containing the URI that the GET request should be made to.

### Returns

`HttpResponse` — The `HttpResponse` object representing the result of the request.

### Examples

C#:

```csharp
var response = Http.Get("https://api.example.com/quotes/EURUSD");
if (response.IsSuccessful)
    Print(response.Body);
else
    Print("Request failed with status code {0}", response.StatusCode);
```

Python:

```python
response = api.Http.Get("https://api.example.com/quotes/EURUSD")
if response.IsSuccessful:
    api.Print(response.Body)
else:
    api.Print(f"Request failed with status code {response.StatusCode}")
```

