Skip to main content
After creating an orchestration, you can track its status using the request ID returned from the creation response.

Get Orchestration Details

main.go
details, err := otimClient.GetOrchestrationDetails(ctx, &client.GetOrchestrationDetailsRequest{
	RequestID: requestID,
})
if err != nil {
	log.Fatal("Failed to get details:", err)
}
fmt.Printf("Status: %+v\n", details)

Understanding the Response

The orchestration details include:
  • Status: Current state of the orchestration (pending, inProgress, paid, completed, failed)
  • Request ID: The unique identifier for this orchestration
  • Payment Address: The ephemeral wallet address for receiving payments
  • Settlement Details: Information about the target chain, token, and amount

Polling for Updates

For long-running orchestrations, you can poll periodically to check for status changes:
main.go
for {
	details, _ := otimClient.GetOrchestrationDetails(ctx, &client.GetOrchestrationDetailsRequest{
		RequestID: requestID,
	})
	
	fmt.Println("Current status:", details.Status)
	
	if details.Status == "paid" || details.Status == "completed" || details.Status == "failed" {
		break
	}
	
	time.Sleep(5 * time.Second)
}

Next Steps

For complete working examples, check out the Otim Playground.