> ## Documentation Index
> Fetch the complete documentation index at: https://docs.canton.network/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> If you are building a Canton Network application, start from https://docs.canton.network/appdev/quickstart.md. To run only a local network for your own Daml code, without building the QuickStart demo, see https://docs.canton.network/sdks-tools/development-tools/localnet.md.

# GET /v0/domains/:domain_id/members/:member_id/traffic-status

> Get a member's traffic status as reported by the sequencer, according to ledger state at the time of the request.

Get a member's traffic status as reported by the sequencer, according to ledger state at the time of the request.

OpenAPI

```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl --request GET \
  --url 'https://scan.sv-1.global.canton.network.sync.global/api/scan/v0/domains/{domain_id}/members/{member_id}/traffic-status'
```

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
import json
import requests

url = "https://scan.sv-1.global.canton.network.sync.global/api/scan/v0/domains/{domain_id}/members/{member_id}/traffic-status"
response = requests.request("GET", url)

print(response.text)
```

```javascript JavaScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
const response = await fetch('https://scan.sv-1.global.canton.network.sync.global/api/scan/v0/domains/{domain_id}/members/{member_id}/traffic-status', {
  method: 'GET',
});

console.log(await response.text());
```

```php PHP theme={"theme":{"light":"github-light","dark":"github-dark"}}
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://scan.sv-1.global.canton.network.sync.global/api/scan/v0/domains/{domain_id}/members/{member_id}/traffic-status',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'GET',
]);

$response = curl_exec($curl);
echo $response;
```

```go Go theme={"theme":{"light":"github-light","dark":"github-dark"}}
package main

import (
  "fmt"
  "io"
  "net/http"
)

func main() {
  req, _ := http.NewRequest("GET", "https://scan.sv-1.global.canton.network.sync.global/api/scan/v0/domains/{domain_id}/members/{member_id}/traffic-status", nil)
  response, _ := http.DefaultClient.Do(req)
  defer response.Body.Close()
  body, _ := io.ReadAll(response.Body)
  fmt.Println(string(body))
}
```

```java Java theme={"theme":{"light":"github-light","dark":"github-dark"}}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

var request = HttpRequest.newBuilder()
    .uri(URI.create("https://scan.sv-1.global.canton.network.sync.global/api/scan/v0/domains/{domain_id}/members/{member_id}/traffic-status"))
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
var response = HttpClient.newHttpClient().send(
    request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

```ruby Ruby theme={"theme":{"light":"github-light","dark":"github-dark"}}
require 'net/http'
require 'uri'

uri = URI('https://scan.sv-1.global.canton.network.sync.global/api/scan/v0/domains/{domain_id}/members/{member_id}/traffic-status')
request = Net::HTTP::Get.new(uri)
response = Net::HTTP.start(uri.hostname, uri.port) do |http|
  http.request(request)
end
puts response.body
```

```json 200 theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "traffic_status": {
    "actual": {
      "total_consumed": 123,
      "total_limit": 123
    },
    "target": {
      "total_purchased": 123
    }
  }
}
```

```json 400 theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "error": "<string>"
}
```

```json 404 theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "error": "<string>"
}
```

```json 500 theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "error": "<string>"
}
```

## Path parameters

**domain\_id** `string` *required*

The synchronizer ID to look up traffic for.

**member\_id** `string` *required*

The participant or mediator whose traffic to look up, in the format `code::id::fingerprint` where `code` is `PAR` or `MED`.

## Responses

### 200

ok

application/json

**traffic\_status** `MemberTrafficStatus` *required*

The current traffic state for the member on the synchronizer under `actual`, and the total purchased traffic under `target`. The purchased traffic may exceed the `actual` limit as purchases take time to be incorporated into the limit.

**child attributes**

**actual** `ActualMemberTrafficState` *required*

The current traffic state for the member on the synchronizer

**child attributes**

**total\_consumed** `integer (int64)` *required*

Total extra traffic consumed by the member on the given synchronizer

**total\_limit** `integer (int64)` *required*

Current extra traffic limit set for the member on the given synchronizer. An extra traffic top-up is complete once total\_limit matches total\_purchased.

**target** `TargetMemberTrafficState` *required*

Total purchased traffic; may exceed limit in `actual`

**child attributes**

**total\_purchased** `integer (int64)` *required*

Total extra traffic purchased for the member on the given synchronizer in bytes.

### 400

bad request

application/json

**error** `string` *required*

### 404

not found

application/json

**error** `string` *required*

### 500

internal server error

application/json

**error** `string` *required*
