Skip to content

Added a new REST endpoint to return open DEX offers for a Stellar acc…#43

Open
Riel101 wants to merge 1 commit into
stellarkit-lab-devtools:mainfrom
Riel101:offers_endpoint
Open

Added a new REST endpoint to return open DEX offers for a Stellar acc…#43
Riel101 wants to merge 1 commit into
stellarkit-lab-devtools:mainfrom
Riel101:offers_endpoint

Conversation

@Riel101
Copy link
Copy Markdown

@Riel101 Riel101 commented May 27, 2026

Close #14

Summary

Adds a new REST endpoint to return open DEX offers for a Stellar account.

What changed

  • Implemented GET /account/:id/offers in account.js
  • Validates Stellar account IDs using existing validator logic
  • Supports pagination with:
    • limit
    • cursor
  • Returns each offer with:
    • id
    • selling asset object + amount
    • buying asset object
    • price
    • lastModifiedLedger

Tests

  • Added coverage for GET /account/:id/offers in api.test.js
  • Verified:
    • valid account returns open offers
    • limit is respected
    • invalid account ID returns 400 ValidationError

Files changed

  • account.js
  • api.test.js
  • index.js (added new endpoint to root endpoint listing)

Notes

This PR implements issue #14: Add GET /account/:id/offers endpoint and includes validation, pagination, and required response fields.

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 27, 2026

@Riel101 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Sulex45
Copy link
Copy Markdown
Contributor

Sulex45 commented May 27, 2026

Resolve src/index.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add GET /account/:id/offers endpoint

2 participants