---
updatedAt: 2025-06-12T20:39:43.000Z
agentTools:
  projectIndex: https://docs.zondacrypto.exchange/llms.txt
---

# New order

<<app_name>> market allows you to place the following orders: limit, market, fill or kill and post only. See below for details. Each unused parameter should be assigned a null value.

**Limit** - standard method to perform order. Default view on the exchange.

**Market** - quick transaction. If you want to buy/sell cryptocurrency immediately. You only indicate the amount you want to spend on it, and the system automatically uses the best of the orders (at the lowest exchange rate) and exchanges funds for the digital currency you indicated.

**Post only** - order post only is to ensure that you always pay the MAKER commission. When you try to set up this type of order, you can be sure that it will be issued to the list of orders (orderbook) or canceled (in case of immediate transaction, which would result in collecting the TAKER commission)

**Fill or Kill** - order is a limit order that must be filled immediately in its entirety or it is canceled (killed). The purpose of a fill or kill order is to ensure that a position is entered instantly and at a specific price.

**IOC (Immediate or Cancel)** - a limit offer, which allows to buy or sell cryptocurrency immediately by selected exchange rate or more favourable. In contrast, to Fill or Kill - IOC allows to a partial realisation of your offer if it cannot be filled immediately.

If any of **required** parameters is **unused** - it shoulde be a **null** value.

```json Market #1
{
  "offerType": "BUY",
  "amount": "20",
  "price": null,
  "rate": null,
  "postOnly": false,
  "mode": "market",
  "fillOrKill": false
}
```
```json Market #2
{
  "offerType": "BUY",
  "amount": null,
  "price": "500",
  "rate": null,
  "postOnly": false,
  "mode": "market",
  "fillOrKill": false
}
```
```json Limit
{
  "offerType": "SELL",
  "amount": "1",
  "price": null,
  "rate": "24600",
  "postOnly": false,
  "mode": "limit",
  "fillOrKill": false
}
```
```json Post only
{
  "offerType": "BUY",
  "amount": "100",
  "price": null,
  "rate": "0.8",
  "postOnly": true,
  "mode": "limit",
  "fillOrKill": false
}
```
```json Fill or Kill
{
  "offerType": "BUY",
  "amount": "11",
  "price": null,
  "rate": "230.11",
  "postOnly": false,
  "mode": "limit",
  "fillOrKill": true
}
```
```json IOC
{
  "offerType": "SELL",
  "amount": "10",
  "price": null,
  "rate": "1.07",
  "postOnly": false,
  "mode": "limit",
  "immediateOrCancel": true
}
```

**Response details**

<Table align={["left","left","left"]}>
  <thead>
    <tr>
      <th>
        Key
      </th>

      <th>
        Type
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        completed
      </td>

      <td>
        boolean
      </td>

      <td>
        If the order was completed entirely
      </td>
    </tr>

    <tr>
      <td>
        offerId
      </td>

      <td>
        UUID
      </td>

      <td>
        UUID of the order
      </td>
    </tr>

    <tr>
      <td>
        transactions
      </td>

      <td>
        array
      </td>

      <td>
        Array of finished transactions during order execution
      </td>
    </tr>

    <tr>
      <td>
        * amount 
      </td>

      <td>
        decimal
      </td>

      <td>
        Amount of cryptocurrency in the transaction
      </td>
    </tr>

    <tr>
      <td>
        * rate 
      </td>

      <td>
        decimal
      </td>

      <td>
        Rate of finished transaction.
      </td>
    </tr>
  </tbody>
</Table>

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "private-rest",
    "version": "1.2.0-en"
  },
  "servers": [
    {
      "url": "https://api.zondacrypto.exchange/rest"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "API-Key"
      },
      "sec1": {
        "type": "apiKey",
        "in": "header",
        "name": "API-Hash"
      },
      "sec2": {
        "type": "apiKey",
        "in": "header",
        "name": "operation-id"
      },
      "sec3": {
        "type": "apiKey",
        "in": "header",
        "name": "Request-Timestamp"
      }
    }
  },
  "security": [
    {
      "sec0": [],
      "sec1": [],
      "sec2": [],
      "sec3": []
    }
  ],
  "paths": {
    "/trading/offer/{trading_pair}": {
      "post": {
        "summary": "New order",
        "description": "zondacrypto market allows you to place the following orders: limit, market, fill or kill and post only. See below for details. Each unused parameter should be assigned a null value.",
        "operationId": "new-order",
        "parameters": [
          {
            "name": "trading_pair",
            "in": "path",
            "description": "Symbol of trading pair that your request refers to",
            "schema": {
              "type": "string",
              "default": "BTC-PLN"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "amount",
                  "rate",
                  "offerType",
                  "mode"
                ],
                "properties": {
                  "amount": {
                    "type": "number",
                    "description": "The amount of cryptocurrency",
                    "format": "float"
                  },
                  "rate": {
                    "type": "number",
                    "description": "Rate of the order",
                    "format": "float"
                  },
                  "price": {
                    "type": "number",
                    "description": "Total price of the order. Can be used only in market mode and replaces rate parameter. Proper use is presented below.",
                    "format": "float"
                  },
                  "offerType": {
                    "type": "string",
                    "description": "Order type: buy / sell"
                  },
                  "mode": {
                    "type": "string",
                    "description": "Order mode: limit / market"
                  },
                  "postOnly": {
                    "type": "boolean",
                    "description": "If order is postOnly"
                  },
                  "fillOrKill": {
                    "type": "boolean",
                    "description": "If order is fillOrKill"
                  },
                  "immediateOrCancel": {
                    "type": "boolean",
                    "description": "If order is immediateOrCancel."
                  },
                  "firstBalanceId": {
                    "type": "string",
                    "description": "UUID of the wallet for first currency from selected market. If not used - the transaction will be made using default wallet."
                  },
                  "secondBalanceId": {
                    "type": "string",
                    "description": "UUID of the wallet for second currency from selected market. If not used - the transaction will be made using default wallet."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"status\": \"Ok\",\n  \"completed\": true,\n  \"offerId\": \"6388963b-1d0d-4a70-ab6b-2ada1f9c06ea\",\n  \"transactions\": [\n    {\n      \"amount\": \"0.00005\",\n      \"rate\": \"21980.02\"\n    }\n  ]\n}"
                  },
                  "Fail": {
                    "value": "{\n  \"status\": \"Fail\",\n  \"errors\": [\n    \"FUNDS_NOT_SUFFICIENT\"\n  ]\n}"
                  }
                },
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "example": "Ok"
                        },
                        "completed": {
                          "type": "boolean",
                          "example": true,
                          "default": true
                        },
                        "offerId": {
                          "type": "string",
                          "example": "6388963b-1d0d-4a70-ab6b-2ada1f9c06ea"
                        },
                        "transactions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "string",
                                "example": "0.00005"
                              },
                              "rate": {
                                "type": "string",
                                "example": "21980.02"
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "title": "Fail",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "example": "Fail"
                        },
                        "errors": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "example": "FUNDS_NOT_SUFFICIENT"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "javascript",
              "code": "// This is a private endpoint which requires authentication headers.\n\nvar request = require(\"request\");\n\nvar options = { method: 'POST',\n  url: 'https://api.zondacrypto.exchange/rest/trading/offer/BTC-PLN',\n  headers: { 'content-type': 'application/json' },\n  body: '{\"amount\":0.45,\"rate\":23000,\"offerType\":\"sell\",\"mode\":\"limit\",\"postOnly\":false,\"fillOrKill\":false}' };\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});",
              "name": "Node"
            },
            {
              "language": "ruby",
              "code": "# This is a private endpoint which requires authentication headers.\n\nrequire 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.zondacrypto.exchange/rest/trading/offer/BTC-PLN\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\\"amount\\\":0.45,\\\"rate\\\":23000,\\\"offerType\\\":\\\"sell\\\",\\\"mode\\\":\\\"limit\\\",\\\"postOnly\\\":false,\\\"fillOrKill\\\":false}\"\n\nresponse = http.request(request)\nputs response.read_body"
            },
            {
              "language": "python",
              "code": "# This is a private endpoint which requires authentication headers.\n\nimport requests\n\nurl = \"https://api.zondacrypto.exchange/rest/trading/offer/BTC-PLN\"\n\npayload = \"{\\\"amount\\\":0.45,\\\"rate\\\":23000,\\\"offerType\\\":\\\"sell\\\",\\\"mode\\\":\\\"limit\\\",\\\"postOnly\\\":false,\\\"fillOrKill\\\":false}\"\nresponse = requests.request(\"POST\", url, data=payload)\n\nprint(response.text)"
            }
          ],
          "samples-languages": [
            "javascript",
            "ruby",
            "python"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [
      {
        "key": "Content-Type",
        "value": "application/json"
      }
    ],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```