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

# 报价

> 报价是针对已发布物料挂单的买价或卖价，私密发送给挂单作者。

报价是对挂单的响应——它代表来自贸易伙伴的定价提议。与挂单不同，报价内容是**端到端加密**的（[NIP-44](https://github.com/nostr-protocol/nips/blob/master/44.md)），只有会话中的双方可以读取。加密密钥由发送方的私钥和接收方的公钥派生，这意味着任何节点或第三方都无法解密其内容。

**Kind：** `2014`

<Note>
  发布报价时，客户端**必须**将原始挂单重新发布到该挂单 `"r"` 标签中指定的节点 URL。由于挂单是可替换事件（kind `31001`），节点可能已不再持有原始版本。重新发布可确保会话对根挂单的引用得以保留。
</Note>

**内容：**

```yaml theme={null}
{
  "company": "<string - Company name (set by app layer)>",
  "contact": "<string - Contact information>",
  "message": "<string - Quote message or note>",
  "qty": "<int - Quantity being quoted>",
  "unit_price": "<float64 - Unit price for the quoted item>",
  "timing": {
    "lead_time": <string - Lead Time (Optional), supply listings>,
    "required_date": <int64 - Required Date as Unix timestamp (Optional), demand listings>
    "expiry": <int64 - Listing expiry as Unix timestamp (Optional)>
  },
  "terms": {
    "shipping": {
      "incoterm": "<string - Incoterm (e.g. FOB, CIF)>",
      "place": "<string - Place of delivery or shipment>"
    },
    "payment_term": {
      "code": "<string - Payment term code (e.g. NET30)>",
      "currency": "<string - Currency code (e.g. USD)>"
    }
  },
  "meta": "<object - Arbitrary metadata JSON object (type: object, Optional)>",
  "schema_version": "<string - quote schema version"
}
```

该对象被加密后放入事件的 `content` 字段中。接收后由接收方解密。

**报价标签**

```json theme={null}
[
  ["h", "thread_id"],
  ["n", "material_no"],
  ["m", "manufacturer name"],
  ["y", "supply or demand"],
  ["c", "poster_name"],
  ["b", "any"],
  ["t", "any"],
  ["i", "internal_no"],
  ["c", "any"],

  ["r", "inbox_node_url"],
  ["p", "recipient_pubkey"],
  ["e", "event_id", "", "root"],
  ["u", "user_pubkey1", "user_pubkey2"]
]
```

* 报价**应当**复制挂单的标签。
* 报价**必须**在 thread\_id `"h"` 不存在时生成一个——参见[会话](/cn/oma/threads)。
* 报价**必须**将接收方 `"p"` 标签设置为挂单事件作者的公钥。
* 报价**必须**发布到挂单 `"r"` 标签指定的收件节点 URL，以及发送方自己的收件节点。
