From aab1d8ecf36a4f21c5d2c72dc6080106b58ac339 Mon Sep 17 00:00:00 2001 From: alexpipipi Date: Wed, 21 Oct 2026 12:15:12 +0200 Subject: [PATCH 1/2] =?UTF-8?q?docs(DEV-2398):=20News=20=E2=80=94=20add=20?= =?UTF-8?q?direction=20param,=20offset=20cap=2010000,=20422=20response?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- paths/news.yaml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/paths/news.yaml b/paths/news.yaml index 29138b9..46032bc 100644 --- a/paths/news.yaml +++ b/paths/news.yaml @@ -44,12 +44,22 @@ - name: offset in: query required: false - description: The offset of the data. Maximum 9000; to reach older articles, narrow the period with from and to + description: The offset of the data. The sum of offset and limit must not exceed 10000; to reach older articles, narrow the period with from and to schema: type: integer default: 0 minimum: 0 - maximum: 9000 + maximum: 10000 + - name: direction + in: query + required: false + description: Sort order. 0 returns the newest articles first. 1 returns articles in the order they entered the database, so you can page forward through a period with offset without duplicates. With 1, from and to are required and the window between them must not exceed 31 days + schema: + type: integer + default: 0 + enum: + - 0 + - 1 - name: fmt in: query required: false @@ -130,5 +140,7 @@ description: Unauthorized '404': description: No news articles found + '422': + description: Validation error, for example direction=1 without from and to, a from-to window longer than 31 days, or offset plus limit above 10000 tags: - News From 1999256cf2de52a1808387cc042bf69d05bd05eb Mon Sep 17 00:00:00 2001 From: alexpipipi Date: Wed, 21 Oct 2026 12:47:36 +0200 Subject: [PATCH 2/2] docs(DEV-2398): regenerate postman for news direction --- scripts/postman-config.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/postman-config.yaml b/scripts/postman-config.yaml index b0bff44..032b20c 100644 --- a/scripts/postman-config.yaml +++ b/scripts/postman-config.yaml @@ -799,6 +799,15 @@ folders: t: "earnings" limit: "10" fmt: "json" + - name: "News — Forward Paging (direction=1)" + query_overrides: + s: "AAPL.US" + direction: "1" + from: "2025-01-01" + to: "2025-01-07" + limit: "10" + offset: "0" + fmt: "json" - path: "/sentiments" variants: - name: "News Sentiment — AAPL.US, BTC-USD.CC"