# suix_getDynamicFieldObject

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://sui-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a specific dynamic field object, identified by its parent object ID and field name.


Reference: https://www.alchemy.com/docs/chains/sui/sui-api-endpoints/suix-get-dynamic-field-object

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| parent_object_id | string | Yes | The ID of the queried parent object that owns the dynamic field. |
| name | object | Yes | The name of the dynamic field, specified as a struct containing type and value. |

## Result

**result** (object): The resolved dynamic field object response.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "suix_getDynamicFieldObject",
  "params": [
    "0x3ddea0f8c3da994d9ead562ce76e36fdef6a382da344930c73d1298b0e9644b8",
    {
      "type": "0x0000000000000000000000000000000000000000000000000000000000000009::test::TestField",
      "value": "some_value"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "data": {
      "objectId": "0x3ddea0f8c3da994d9ead562ce76e36fdef6a382da344930c73d1298b0e9644b8",
      "version": "1",
      "digest": "Faiv4yqGR4HjAW8WhMN1NHHNStxXgP3u22dVPyvLad2z",
      "type": "0x0000000000000000000000000000000000000000000000000000000000000009::test::TestField",
      "owner": {
        "AddressOwner": "0x5ea6f7a348f4a7bd1a9ab069eb7f63865de3075cc5a4e62432f634b50fd2bb2b"
      },
      "previousTransaction": "5qTpesGST3v9NmMTkzV7HHNZRJh52BSqUTErc6L6XGm",
      "storageRebate": "100",
      "content": {
        "dataType": "moveObject",
        "type": "0x0000000000000000000000000000000000000000000000000000000000000009::test::TestField",
        "hasPublicTransfer": true,
        "fields": {}
      }
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://sui-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "suix_getDynamicFieldObject",
  "params": [
    "0x3ddea0f8c3da994d9ead562ce76e36fdef6a382da344930c73d1298b0e9644b8",
    {
      "type": "0x0000000000000000000000000000000000000000000000000000000000000009::test::TestField",
      "value": "some_value"
    }
  ]
}'
```

### JavaScript

```javascript
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({
    jsonrpc: '2.0',
    id: 1,
    method: 'suix_getDynamicFieldObject',
    params: [
      '0x3ddea0f8c3da994d9ead562ce76e36fdef6a382da344930c73d1298b0e9644b8',
      {
        type: '0x0000000000000000000000000000000000000000000000000000000000000009::test::TestField',
        value: 'some_value'
      }
    ]
  })
};

fetch('https://sui-mainnet.g.alchemy.com/v2/docs-demo', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://sui-mainnet.g.alchemy.com/v2/docs-demo"

payload = {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "suix_getDynamicFieldObject",
    "params": [
        "0x3ddea0f8c3da994d9ead562ce76e36fdef6a382da344930c73d1298b0e9644b8",
        {
            "type": "0x0000000000000000000000000000000000000000000000000000000000000009::test::TestField",
            "value": "some_value"
        }
    ]
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

### Go

```go
package main

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

func main() {

	url := "https://sui-mainnet.g.alchemy.com/v2/docs-demo"

	payload := strings.NewReader("{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"suix_getDynamicFieldObject\",\n  \"params\": [\n    \"0x3ddea0f8c3da994d9ead562ce76e36fdef6a382da344930c73d1298b0e9644b8\",\n    {\n      \"type\": \"0x0000000000000000000000000000000000000000000000000000000000000009::test::TestField\",\n      \"value\": \"some_value\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
```

### Java

```java
HttpResponse<String> response = Unirest.post("https://sui-mainnet.g.alchemy.com/v2/docs-demo")
  .header("Content-Type", "application/json")
  .body("{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"suix_getDynamicFieldObject\",\n  \"params\": [\n    \"0x3ddea0f8c3da994d9ead562ce76e36fdef6a382da344930c73d1298b0e9644b8\",\n    {\n      \"type\": \"0x0000000000000000000000000000000000000000000000000000000000000009::test::TestField\",\n      \"value\": \"some_value\"\n    }\n  ]\n}")
  .asString();
```

### C#

```csharp
using RestSharp;


var options = new RestClientOptions("https://sui-mainnet.g.alchemy.com/v2/docs-demo");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddJsonBody("{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"suix_getDynamicFieldObject\",\n  \"params\": [\n    \"0x3ddea0f8c3da994d9ead562ce76e36fdef6a382da344930c73d1298b0e9644b8\",\n    {\n      \"type\": \"0x0000000000000000000000000000000000000000000000000000000000000009::test::TestField\",\n      \"value\": \"some_value\"\n    }\n  ]\n}", false);
var response = await client.PostAsync(request);

Console.WriteLine("{0}", response.Content);

```


## OpenRPC Method Specification

```yaml
name: suix_getDynamicFieldObject
summary: Get a dynamic field object by name
description: |
  Returns information about a specific dynamic field object, identified by its parent object ID and field name.
params:
  - name: parent_object_id
    required: true
    description: The ID of the queried parent object that owns the dynamic field.
    schema:
      type: string
  - name: name
    required: true
    description: The name of the dynamic field, specified as a struct containing type and value.
    schema:
      type: object
      required:
        - type
        - value
      description: The name of a dynamic field, consisting of its type and value.
      properties:
        type:
          type: string
        value:
          type: string
result:
  name: result
  description: The resolved dynamic field object response.
  schema:
    type: object
examples:
  - name: Get a dynamic field object
    params:
      - name: parent_object_id
        value: '0x3ddea0f8c3da994d9ead562ce76e36fdef6a382da344930c73d1298b0e9644b8'
      - name: name
        value:
          type: 0x0000000000000000000000000000000000000000000000000000000000000009::test::TestField
          value: some_value
    result:
      name: result
      value:
        data:
          objectId: '0x3ddea0f8c3da994d9ead562ce76e36fdef6a382da344930c73d1298b0e9644b8'
          version: '1'
          digest: Faiv4yqGR4HjAW8WhMN1NHHNStxXgP3u22dVPyvLad2z
          type: 0x0000000000000000000000000000000000000000000000000000000000000009::test::TestField
          owner:
            AddressOwner: '0x5ea6f7a348f4a7bd1a9ab069eb7f63865de3075cc5a4e62432f634b50fd2bb2b'
          previousTransaction: 5qTpesGST3v9NmMTkzV7HHNZRJh52BSqUTErc6L6XGm
          storageRebate: '100'
          content:
            dataType: moveObject
            type: 0x0000000000000000000000000000000000000000000000000000000000000009::test::TestField
            hasPublicTransfer: true
            fields: {}
```
