> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.0x.org/llms.txt.
> For full documentation content, see https://docs.0x.org/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.0x.org/_mcp/server.

# getStatus

GET https://api.0x.org/gasless/status/{tradeHash}

Get the status of a gasless swap

Reference: https://docs.0x.org/api-reference/0-x-api/gasless/getstatus

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: 0x API
  version: 1.0.0
paths:
  /gasless/status/{tradeHash}:
    get:
      operationId: getstatus
      summary: getStatus
      description: Get the status of a gasless swap
      tags:
        - subpackage_gasless
      parameters:
        - name: tradeHash
          in: path
          description: >-
            The hash for the trade according to
            [EIP-712](https://eips.ethereum.org/EIPS/eip-712)
          required: true
          schema:
            type: string
        - name: chainId
          in: query
          description: ' [here](https://docs.0x.org/docs/introduction/supported-chains) for the list of supported chains'
          required: true
          schema:
            type: integer
        - name: 0x-api-key
          in: header
          description: Visit dashboard.0x.org to get your API Key
          required: true
          schema:
            type: string
        - name: 0x-version
          in: header
          description: API version
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Gasless_getstatus_Response_200'
        '400':
          description: 400 error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Gasless::getStatusRequestBadRequestError'
        '404':
          description: 404 error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Gasless::getStatusRequestNotFoundError'
        '500':
          description: 500 error response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Gasless::getStatusRequestInternalServerError
servers:
  - url: https://api.0x.org
components:
  schemas:
    GaslessStatusTradeHashGetResponsesContentApplicationJsonSchemaOneOf0ApprovalTransactionsItems:
      type: object
      properties:
        hash:
          type: string
          description: The onchain transaction hash
        timestamp:
          type: integer
          description: The timestamp when the transaction was submitted onchain
      required:
        - hash
        - timestamp
      title: >-
        GaslessStatusTradeHashGetResponsesContentApplicationJsonSchemaOneOf0ApprovalTransactionsItems
    GaslessStatusTradeHashGetResponsesContentApplicationJsonSchemaOneOf0Status:
      type: string
      enum:
        - pending
        - submitted
        - succeeded
        - confirmed
      description: >-
        `pending` means that the order has been queued on 0x. `submitted` means
        that it has been submitted onchain, `succeeded` means it has been
        included in a block, `confirmed` means the transaction has at least 3
        confirmations onchain
      title: >-
        GaslessStatusTradeHashGetResponsesContentApplicationJsonSchemaOneOf0Status
    GaslessStatusTradeHashGetResponsesContentApplicationJsonSchemaOneOf0TransactionsItems:
      type: object
      properties:
        hash:
          type: string
          description: The onchain transaction hash
        timestamp:
          type: integer
          description: The timestamp when the transaction was submitted onchain
      required:
        - hash
        - timestamp
      title: >-
        GaslessStatusTradeHashGetResponsesContentApplicationJsonSchemaOneOf0TransactionsItems
    GaslessGetstatusResponse2000:
      type: object
      properties:
        approvalTransactions:
          type: array
          items:
            $ref: >-
              #/components/schemas/GaslessStatusTradeHashGetResponsesContentApplicationJsonSchemaOneOf0ApprovalTransactionsItems
          description: Details of the gasless approval transaction
        status:
          $ref: >-
            #/components/schemas/GaslessStatusTradeHashGetResponsesContentApplicationJsonSchemaOneOf0Status
          description: >-
            `pending` means that the order has been queued on 0x. `submitted`
            means that it has been submitted onchain, `succeeded` means it has
            been included in a block, `confirmed` means the transaction has at
            least 3 confirmations onchain
        transactions:
          type: array
          items:
            $ref: >-
              #/components/schemas/GaslessStatusTradeHashGetResponsesContentApplicationJsonSchemaOneOf0TransactionsItems
          description: >-
            Details of the gasless swap transaction. If the trade is `pending`,
            no transaction will be returned. If `submitted`, multiple
            transactions may be returned, but only one will be mined. If
            `succeeded` or `confirmed`, the mined transaction will be returned
        zid:
          type: string
          description: The unique ZeroEx identifier of the request
      required:
        - status
        - transactions
        - zid
      title: GaslessGetstatusResponse2000
    GaslessStatusTradeHashGetResponsesContentApplicationJsonSchemaOneOf1ApprovalTransactionsItems:
      type: object
      properties:
        hash:
          type: string
          description: The onchain transaction hash
        timestamp:
          type: integer
          description: The timestamp when the transaction was submitted onchain
      required:
        - hash
        - timestamp
      title: >-
        GaslessStatusTradeHashGetResponsesContentApplicationJsonSchemaOneOf1ApprovalTransactionsItems
    GaslessStatusTradeHashGetResponsesContentApplicationJsonSchemaOneOf1Reason:
      type: string
      enum:
        - transaction_simulation_failed
        - order_expired
        - last_look_declined
        - transaction_reverted
        - market_maker_sigature_error
        - insufficient_allowance
        - insufficient_balance
        - internal_error
      description: This provides more context about why the transaction failed
      title: >-
        GaslessStatusTradeHashGetResponsesContentApplicationJsonSchemaOneOf1Reason
    GaslessStatusTradeHashGetResponsesContentApplicationJsonSchemaOneOf1Status:
      type: string
      enum:
        - failed
      description: '`failed` means that the order failed to be submitted onchain'
      title: >-
        GaslessStatusTradeHashGetResponsesContentApplicationJsonSchemaOneOf1Status
    GaslessStatusTradeHashGetResponsesContentApplicationJsonSchemaOneOf1TransactionsItems:
      type: object
      properties:
        hash:
          type: string
          description: The onchain transaction hash
        timestamp:
          type: integer
          description: The timestamp when the transaction was submitted onchain
      required:
        - hash
        - timestamp
      title: >-
        GaslessStatusTradeHashGetResponsesContentApplicationJsonSchemaOneOf1TransactionsItems
    GaslessGetstatusResponse2001:
      type: object
      properties:
        approvalTransactions:
          type: array
          items:
            $ref: >-
              #/components/schemas/GaslessStatusTradeHashGetResponsesContentApplicationJsonSchemaOneOf1ApprovalTransactionsItems
          description: Details of the gasless approval transaction
        reason:
          $ref: >-
            #/components/schemas/GaslessStatusTradeHashGetResponsesContentApplicationJsonSchemaOneOf1Reason
          description: This provides more context about why the transaction failed
        status:
          $ref: >-
            #/components/schemas/GaslessStatusTradeHashGetResponsesContentApplicationJsonSchemaOneOf1Status
          description: '`failed` means that the order failed to be submitted onchain'
        transactions:
          type: array
          items:
            $ref: >-
              #/components/schemas/GaslessStatusTradeHashGetResponsesContentApplicationJsonSchemaOneOf1TransactionsItems
          description: >-
            Details of the gasless swap transaction. If the trade status is
            `failed`, there may be 0 (if it failed before submission) to
            multiple transactions (if the transaction reverted)
        zid:
          type: string
          description: The unique ZeroEx identifier of the request
      required:
        - reason
        - status
        - transactions
        - zid
      title: GaslessGetstatusResponse2001
    Gasless_getstatus_Response_200:
      oneOf:
        - $ref: '#/components/schemas/GaslessGetstatusResponse2000'
        - $ref: '#/components/schemas/GaslessGetstatusResponse2001'
      title: Gasless_getstatus_Response_200
    InputInvalidName:
      type: string
      enum:
        - INPUT_INVALID
      title: InputInvalidName
    InputInvalidDataDetailsItems:
      type: object
      properties:
        field:
          type: string
          description: The input field name
        reason:
          type: string
          description: The validation failure reason
      required:
        - field
        - reason
      title: InputInvalidDataDetailsItems
    InputInvalidData:
      type: object
      properties:
        zid:
          type: string
          description: The unique ZeroEx identifier of the request
        details:
          type: array
          items:
            $ref: '#/components/schemas/InputInvalidDataDetailsItems'
          description: The list of invalid inputs
      required:
        - zid
        - details
      title: InputInvalidData
    INPUT_INVALID:
      type: object
      properties:
        name:
          $ref: '#/components/schemas/InputInvalidName'
        message:
          type: string
        data:
          $ref: '#/components/schemas/InputInvalidData'
      required:
        - name
        - message
        - data
      title: INPUT_INVALID
    Gasless::getStatusRequestBadRequestError:
      oneOf:
        - $ref: '#/components/schemas/INPUT_INVALID'
      title: Gasless::getStatusRequestBadRequestError
    MetaTransactionStatusNotFoundName:
      type: string
      enum:
        - META_TRANSACTION_STATUS_NOT_FOUND
      title: MetaTransactionStatusNotFoundName
    MetaTransactionStatusNotFoundData:
      type: object
      properties:
        zid:
          type: string
          description: The unique ZeroEx identifier of the request
      required:
        - zid
      title: MetaTransactionStatusNotFoundData
    META_TRANSACTION_STATUS_NOT_FOUND:
      type: object
      properties:
        name:
          $ref: '#/components/schemas/MetaTransactionStatusNotFoundName'
        message:
          type: string
        data:
          $ref: '#/components/schemas/MetaTransactionStatusNotFoundData'
      required:
        - name
        - message
        - data
      title: META_TRANSACTION_STATUS_NOT_FOUND
    Gasless::getStatusRequestNotFoundError:
      oneOf:
        - $ref: '#/components/schemas/META_TRANSACTION_STATUS_NOT_FOUND'
      title: Gasless::getStatusRequestNotFoundError
    InternalServerErrorName:
      type: string
      enum:
        - INTERNAL_SERVER_ERROR
      title: InternalServerErrorName
    InternalServerErrorData:
      type: object
      properties:
        zid:
          type: string
          description: The unique ZeroEx identifier of the request
      required:
        - zid
      title: InternalServerErrorData
    INTERNAL_SERVER_ERROR:
      type: object
      properties:
        name:
          $ref: '#/components/schemas/InternalServerErrorName'
        message:
          type: string
        data:
          $ref: '#/components/schemas/InternalServerErrorData'
      required:
        - name
        - message
        - data
      title: INTERNAL_SERVER_ERROR
    UncategorizedName:
      type: string
      enum:
        - UNCATEGORIZED
      title: UncategorizedName
    UncategorizedData:
      type: object
      properties:
        zid:
          type: string
          description: The unique ZeroEx identifier of the request
      required:
        - zid
      title: UncategorizedData
    UNCATEGORIZED:
      type: object
      properties:
        name:
          $ref: '#/components/schemas/UncategorizedName'
        message:
          type: string
        data:
          $ref: '#/components/schemas/UncategorizedData'
      required:
        - name
        - message
        - data
      title: UNCATEGORIZED
    Gasless::getStatusRequestInternalServerError:
      oneOf:
        - $ref: '#/components/schemas/INTERNAL_SERVER_ERROR'
        - $ref: '#/components/schemas/UNCATEGORIZED'
      title: Gasless::getStatusRequestInternalServerError

```

## SDK Code Examples

```python Gasless_getstatus_example
import requests

url = "https://api.0x.org/gasless/status/0x6c89e4ac46b246ab72cba02a9fb4f3525b9f8a11ea74262d5dd8ff0e024daf60"

querystring = {"chainId":"8453"}

headers = {
    "0x-api-key": "0x-api-key",
    "0x-version": "v2"
}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript Gasless_getstatus_example
const url = 'https://api.0x.org/gasless/status/0x6c89e4ac46b246ab72cba02a9fb4f3525b9f8a11ea74262d5dd8ff0e024daf60?chainId=8453';
const options = {method: 'GET', headers: {'0x-api-key': '0x-api-key', '0x-version': 'v2'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Gasless_getstatus_example
package main

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

func main() {

	url := "https://api.0x.org/gasless/status/0x6c89e4ac46b246ab72cba02a9fb4f3525b9f8a11ea74262d5dd8ff0e024daf60?chainId=8453"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("0x-api-key", "0x-api-key")
	req.Header.Add("0x-version", "v2")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Gasless_getstatus_example
require 'uri'
require 'net/http'

url = URI("https://api.0x.org/gasless/status/0x6c89e4ac46b246ab72cba02a9fb4f3525b9f8a11ea74262d5dd8ff0e024daf60?chainId=8453")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["0x-api-key"] = '0x-api-key'
request["0x-version"] = 'v2'

response = http.request(request)
puts response.read_body
```

```java Gasless_getstatus_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.0x.org/gasless/status/0x6c89e4ac46b246ab72cba02a9fb4f3525b9f8a11ea74262d5dd8ff0e024daf60?chainId=8453")
  .header("0x-api-key", "0x-api-key")
  .header("0x-version", "v2")
  .asString();
```

```php Gasless_getstatus_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.0x.org/gasless/status/0x6c89e4ac46b246ab72cba02a9fb4f3525b9f8a11ea74262d5dd8ff0e024daf60?chainId=8453', [
  'headers' => [
    '0x-api-key' => '0x-api-key',
    '0x-version' => 'v2',
  ],
]);

echo $response->getBody();
```

```csharp Gasless_getstatus_example
using RestSharp;

var client = new RestClient("https://api.0x.org/gasless/status/0x6c89e4ac46b246ab72cba02a9fb4f3525b9f8a11ea74262d5dd8ff0e024daf60?chainId=8453");
var request = new RestRequest(Method.GET);
request.AddHeader("0x-api-key", "0x-api-key");
request.AddHeader("0x-version", "v2");
IRestResponse response = client.Execute(request);
```

```swift Gasless_getstatus_example
import Foundation

let headers = [
  "0x-api-key": "0x-api-key",
  "0x-version": "v2"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.0x.org/gasless/status/0x6c89e4ac46b246ab72cba02a9fb4f3525b9f8a11ea74262d5dd8ff0e024daf60?chainId=8453")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```