{"id":"056e654dac5eba63ad27e48c8043810beb299063dd75c71bf4c33a139f2a46d9","pubkey":"460c25e682fda7832b52d1f22d3d22b3176d972f60dcdc3212ed8c92ef85065c","created_at":1748639922,"kind":30817,"tags":[["d","asset-prices"],["title","Asset Prices"],["k","31892"],["k","1892"],["k","10041"],["client","nostrnips.com"]],"content":"NIP-85\n======\n\nAsset Prices\n------------\n\n`draft` `optional`\n\nThis NIP defines event kinds to host asset prices.\n\n## Latest Price\n\nKind `31892` stores the latest conversion price. The `d` tag contains the commonly used ticket conversion symbol for the pair. The `value` tag contains the amount, parseable to a Decimal. `n` tags separate the pair into the two ticket symbols. The event's `created_at` field MUST be used as the date/time of the conversion value.\n\n```js\n{\n  \"kind\": 31892,\n  \"tags\": [\n    [\"d\", \"BTCUSD\"],\n    [\"n\", \"BTC\"],\n    [\"n\", \"USD\"],\n    [\"value\", \"100000\"]\n  ],\n  // other fields\n}\n```\n\nSince this is a replaceable event, only the latest price will be available.\n\n## Historical Data\n\nHistorical prices can be found as `1892` events with the same structure as `31892`. Historical queries can then use Nostr's `since` and `until` filters to narrow the search.\n\n```js\n{\n  \"kind\": 1892,\n  \"tags\": [\n    [\"d\", \"BTCUSD\"],\n    [\"n\", \"BTC\"],\n    [\"n\", \"USD\"],\n    [\"value\", \"100000\"]\n  ],\n  // other fields\n}\n```\n\nEven though these events use the `d` tag, they are not replaceable. \n\n## Declaring Pricing Providers\n\nKind 10041 lists the user's authorized providers for pricing services. It contains `s` tags with the provider's pubkey and the relay where those events are stored.\n\n```js\n{\n  \"kind\": 10041,\n  \"tags\": [\n    [\"s\", \"4fd5e210530e4f6b2cb083795834bfe5108324f1ed9f00ab73b9e8fcfe5f12fe\", \"wss://bitagent.prices\"],\n  ],\n  //...\n}\n```","sig":"f8f5715e80ba6de377d6c38032e73af21f0eaefceeede880c18d8f7ffa3360bfc067faea852e13e8140b4ecd34a89aa76256b83fb316d697b2533353a517abe8"}