CityCoins
  • Introduction
  • About CityCoins
    • What are CityCoins?
    • How do I get started?
  • CityCoins Resources
    • General
    • MineCityCoins.com
  • Core Protocol
    • Registration and Activation
    • Mining CityCoins
    • Stacking CityCoins
    • Token Configuration
  • Developer Resources
    • General
    • API
    • Code Examples
      • Get Account Transactions
      • Activation
      • Mining
      • Mining Claims
      • Stacking
    • Contracts
    • Integrations
      • Supporting Stacks
      • Supporting CityCoins
      • Stacks Transactions
      • Additional Info
  • Contract Functions
    • Activation
    • Mining
    • Mining Claims
    • Stacking
    • Stacking Claims
    • Token
Powered by GitBook
On this page
  • Things to Note
  • Endpoint Examples
  • Implementation

Was this helpful?

  1. Developer Resources

API

A simple API to interact with Stacks and CityCoins data.

PreviousGeneralNextCode Examples

Last updated 2 years ago

Was this helpful?

The is a quick and easy way to interact with both Stacks and CityCoins data.

It is built with Cloudflare Workers and micro-stacks, and the .

Things to Note

  • uses simple typed responses and provides detailed error messages

  • all CityCoin contract routes start with :version and :cityname

    • e.g. /v1/mia/mining/get-mining-stats-at-block/57934

  • :version accepts the major CityCoins contract version, e.g. v1, v2

  • :cityname routes accept three letter city names, e.g. mia, nyc

  • all additional parameters follow the order of operations below

    • :blockheight > :cycleid > :userid > :address

  • routes are structured the same as the contract functions and documentation

Endpoint Examples

A full list of routes and responses can be found in the .

Some quick examples:

Implementation

If you want to use this for your project, build a copy for yourself, or have any questions, and reach out!

CityCoins API
code is open source
OpenAPI documentation
Get the current Stacks block height
Get the activation block height for MIA
Get the mining stats at block 49000 for MIA
Get the total supply for MIA
file a GitHub Issue