This week, I put together a small application to experiment with the Splinterlands SPS validator node API.
The goal? To explore available API calls, including some that aren’t in the official schema, and make it easy to interact with them.
The app pulls the API spec directly from the official SPS validator GitHub repository and adds the top 10 validator nodes to the server list for easy access.
By default, it includes all the API calls specified in the official schema. However, I also dug through the code and found some extra endpoints that weren’t listed—so I added those in too!
You can check out the playground here:
👉 validator-playground.spl-stats.com
As usual it a opensource tool so if you wandering how its created here it the repo
👉 https://github.com/gamerbeaker007/sps-validator-playground
If you want to spin it up on your own machine, you can:
Using the Latest Version
docker pull gamerbeaker/splinterlands-validator-swagger:latest
docker run -p 3000:3000 gamerbeaker/splinterlands-validator-swagger:latest
Using a Specific Version
docker pull gamerbeaker/splinterlands-validator-swagger:v1.0.0
docker run -p 3000:3000 gamerbeaker/splinterlands-validator-swagger:v1.0.0
That’s it! You’ll have a local instance ready to test out API calls.
visit: http://localhost:3000/
It shows the top ten active validators select one where you want to experiment with.
If you want to test a specific API call, here’s how it looks in Swagger-UI:
In the example above, you can see how to interact with an endpoint and what to expect in the response. Here’s a breakdown:
This makes it easy to see what’s happening behind the scenes and experiment with different parameters.
One practical use case I found was extending the top SPS holders for BeeBalanced.
Normally, the Splinterlands API only provides the top 100 Staked SPS (SPSP) holders, but with the validator API, I was able to pull 2,000 SPSP holders instead. This made it much easier to get a more accurate view of SPSP distribution.
I might need to tweak the bubble size on the visualizations, but overall, it’s already giving some interesting insights!
I’ve been curious about how the SPS validator nodes work and wanted an easy way to test different API calls. The official schema covers the basics.
Hopefully, this makes it easier for others to experiment too and build some awesome tools!
If you find anything cool while testing, feel free to drop a comment or open an issue in the GitHub repo.
Happy experimenting! 🚀
Do you also want to be part of this amazing play to earn game consider using my referral link.