Skip to content

Instantly share code, notes, and snippets.

@frol
Last active June 27, 2022 23:37
Show Gist options
  • Save frol/990b06a185be8d1eea9e3b1b101d40b0 to your computer and use it in GitHub Desktop.
Save frol/990b06a185be8d1eea9e3b1b101d40b0 to your computer and use it in GitHub Desktop.
{"swagger":"2.0","definitions":{"BalancesResponse":{"type":"object","properties":{"balances":{"type":"array","items":{"type":"object","properties":{"balance":{"type":"string"},"contract_account_id":{"type":"string"},"metadata":{"type":"object","properties":{"decimals":{"type":"integer","format":"int32"},"icon":{"type":"string"},"name":{"type":"string"},"symbol":{"type":"string"}},"required":["decimals","name","symbol"]},"standard":{"type":"string"}},"required":["balance","metadata","standard"]}},"block_height":{"type":"string"},"block_timestamp_nanos":{"type":"string"}},"required":["balances","block_height","block_timestamp_nanos"]},"FtMetadataResponse":{"type":"object","properties":{"block_height":{"type":"string"},"block_timestamp_nanos":{"type":"string"},"metadata":{"type":"object","properties":{"decimals":{"type":"integer","format":"int32"},"icon":{"type":"string"},"name":{"type":"string"},"reference":{"type":"string"},"reference_hash":{"type":"string"},"spec":{"type":"string"},"symbol":{"type":"string"}},"required":["decimals","name","spec","symbol"]}},"required":["block_height","block_timestamp_nanos","metadata"]},"HistoryResponse":{"type":"object","properties":{"block_height":{"type":"string"},"block_timestamp_nanos":{"type":"string"},"history":{"type":"array","items":{"type":"object","properties":{"action_kind":{"type":"string"},"balance":{"type":"string"},"block_height":{"type":"string"},"block_timestamp_nanos":{"type":"string"},"delta_balance":{"type":"string"},"involved_account_id":{"type":"string"},"metadata":{"type":"object","properties":{"decimals":{"type":"integer","format":"int32"},"icon":{"type":"string"},"name":{"type":"string"},"symbol":{"type":"string"}},"required":["decimals","name","symbol"]}},"required":["action_kind","balance","block_height","block_timestamp_nanos","delta_balance","metadata"]}}},"required":["block_height","block_timestamp_nanos","history"]},"NearBalanceResponse":{"type":"object","properties":{"available_balance":{"type":"string"},"block_height":{"type":"string"},"block_timestamp_nanos":{"type":"string"},"metadata":{"type":"object","properties":{"decimals":{"type":"integer","format":"int32"},"icon":{"type":"string"},"name":{"type":"string"},"symbol":{"type":"string"}},"required":["decimals","name","symbol"]},"staked_balance":{"type":"string"},"total_balance":{"type":"string"}},"required":["available_balance","block_height","block_timestamp_nanos","metadata","staked_balance","total_balance"]},"NearHistoryResponse":{"type":"object","properties":{"block_height":{"type":"string"},"block_timestamp_nanos":{"type":"string"},"history":{"type":"array","items":{"type":"object","properties":{"available_balance":{"type":"string"},"block_height":{"type":"string"},"block_timestamp_nanos":{"type":"string"},"cause":{"type":"string"},"delta_available_balance":{"type":"string"},"delta_balance":{"type":"string"},"delta_staked_balance":{"type":"string"},"involved_account_id":{"type":"string"},"staked_balance":{"type":"string"},"total_balance":{"type":"string"}},"required":["available_balance","block_height","block_timestamp_nanos","cause","delta_available_balance","delta_balance","delta_staked_balance","staked_balance","total_balance"]}},"metadata":{"type":"object","properties":{"decimals":{"type":"integer","format":"int32"},"icon":{"type":"string"},"name":{"type":"string"},"symbol":{"type":"string"}},"required":["decimals","name","symbol"]}},"required":["block_height","block_timestamp_nanos","history","metadata"]},"NftBalanceResponse":{"type":"object","properties":{"block_height":{"type":"string"},"block_timestamp_nanos":{"type":"string"},"contract_metadata":{"type":"object","properties":{"base_uri":{"type":"string"},"icon":{"type":"string"},"name":{"type":"string"},"reference":{"type":"string"},"reference_hash":{"type":"string"},"spec":{"type":"string"},"symbol":{"type":"string"}},"required":["name","spec","symbol"]},"nfts":{"type":"array","items":{"type":"object","properties":{"metadata":{"type":"object","properties":{"copies":{"type":"integer","format":"int64"},"description":{"type":"string"},"expires_at":{"type":"string"},"extra":{"type":"string"},"issued_at":{"type":"string"},"media":{"type":"string"},"media_hash":{"type":"string"},"reference":{"type":"string"},"reference_hash":{"type":"string"},"starts_at":{"type":"string"},"title":{"type":"string"},"updated_at":{"type":"string"}}},"owner_account_id":{"type":"string"},"token_id":{"type":"string"}},"required":["owner_account_id","token_id"]}}},"required":["block_height","block_timestamp_nanos","contract_metadata","nfts"]},"NftCountResponse":{"type":"object","properties":{"block_height":{"type":"string"},"block_timestamp_nanos":{"type":"string"},"nft_count":{"type":"array","items":{"type":"object","properties":{"contract_account_id":{"type":"string"},"metadata":{"type":"object","properties":{"base_uri":{"type":"string"},"icon":{"type":"string"},"name":{"type":"string"},"reference":{"type":"string"},"reference_hash":{"type":"string"},"spec":{"type":"string"},"symbol":{"type":"string"}},"required":["name","spec","symbol"]},"nft_count":{"type":"integer","format":"int32"}},"required":["contract_account_id","metadata","nft_count"]}}},"required":["block_height","block_timestamp_nanos","nft_count"]},"NftHistoryResponse":{"type":"object","properties":{"block_height":{"type":"string"},"block_timestamp_nanos":{"type":"string"},"contract_metadata":{"type":"object","properties":{"base_uri":{"type":"string"},"icon":{"type":"string"},"name":{"type":"string"},"reference":{"type":"string"},"reference_hash":{"type":"string"},"spec":{"type":"string"},"symbol":{"type":"string"}},"required":["name","spec","symbol"]},"history":{"type":"array","items":{"type":"object","properties":{"action_kind":{"type":"string"},"block_height":{"type":"string"},"block_timestamp_nanos":{"type":"string"},"new_account_id":{"type":"string"},"old_account_id":{"type":"string"}},"required":["action_kind","block_height","block_timestamp_nanos"]}},"token_metadata":{"type":"object","properties":{"metadata":{"type":"object","properties":{"copies":{"type":"integer","format":"int64"},"description":{"type":"string"},"expires_at":{"type":"string"},"extra":{"type":"string"},"issued_at":{"type":"string"},"media":{"type":"string"},"media_hash":{"type":"string"},"reference":{"type":"string"},"reference_hash":{"type":"string"},"starts_at":{"type":"string"},"title":{"type":"string"},"updated_at":{"type":"string"}}},"owner_account_id":{"type":"string"},"token_id":{"type":"string"}},"required":["owner_account_id","token_id"]}},"required":["block_height","block_timestamp_nanos","contract_metadata","history","token_metadata"]},"NftItemResponse":{"type":"object","properties":{"block_height":{"type":"string"},"block_timestamp_nanos":{"type":"string"},"contract_metadata":{"type":"object","properties":{"base_uri":{"type":"string"},"icon":{"type":"string"},"name":{"type":"string"},"reference":{"type":"string"},"reference_hash":{"type":"string"},"spec":{"type":"string"},"symbol":{"type":"string"}},"required":["name","spec","symbol"]},"nft":{"type":"object","properties":{"metadata":{"type":"object","properties":{"copies":{"type":"integer","format":"int64"},"description":{"type":"string"},"expires_at":{"type":"string"},"extra":{"type":"string"},"issued_at":{"type":"string"},"media":{"type":"string"},"media_hash":{"type":"string"},"reference":{"type":"string"},"reference_hash":{"type":"string"},"starts_at":{"type":"string"},"title":{"type":"string"},"updated_at":{"type":"string"}}},"owner_account_id":{"type":"string"},"token_id":{"type":"string"}},"required":["owner_account_id","token_id"]}},"required":["block_height","block_timestamp_nanos","contract_metadata","nft"]},"NftMetadataResponse":{"type":"object","properties":{"block_height":{"type":"string"},"block_timestamp_nanos":{"type":"string"},"metadata":{"type":"object","properties":{"base_uri":{"type":"string"},"icon":{"type":"string"},"name":{"type":"string"},"reference":{"type":"string"},"reference_hash":{"type":"string"},"spec":{"type":"string"},"symbol":{"type":"string"}},"required":["name","spec","symbol"]}},"required":["block_height","block_timestamp_nanos","metadata"]}},"paths":{"/accounts/{account_id}/coins":{"get":{"summary":"Get the user's balance","description":"This endpoint returns the balance of the given account_id,\n for the specified token_contract_id | near.","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/BalancesResponse"}},"500":{"description":"See the inner `code` value to get more details"}},"parameters":[{"in":"path","name":"account_id","required":true,"type":"string"},{"in":"query","name":"block_height","type":"string"},{"in":"query","name":"block_timestamp_nanos","type":"string"},{"in":"query","name":"limit","type":"integer","format":"int32"},{"in":"query","name":"offset","type":"integer","format":"int32"}]}},"/accounts/{account_id}/coins/NEAR":{"get":{"summary":"Get the user's balance","description":"This endpoint returns the balance of the given account_id,\n for the specified token_contract_id | near.","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/NearBalanceResponse"}},"500":{"description":"See the inner `code` value to get more details"}},"parameters":[{"in":"path","name":"account_id","required":true,"type":"string"},{"in":"query","name":"block_height","type":"string"},{"in":"query","name":"block_timestamp_nanos","type":"string"}]}},"/accounts/{account_id}/coins/NEAR/history":{"get":{"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/NearHistoryResponse"}},"500":{"description":"See the inner `code` value to get more details"}},"parameters":[{"in":"path","name":"account_id","required":true,"type":"string"},{"in":"path","name":"contract_account_id","required":true,"type":"string"},{"in":"path","name":"account_id","required":true,"type":"string"},{"in":"query","name":"block_height","type":"string"},{"in":"query","name":"block_timestamp_nanos","type":"string"},{"in":"query","name":"limit","type":"integer","format":"int32"},{"in":"query","name":"offset","type":"integer","format":"int32"}]}},"/accounts/{account_id}/coins/{contract_account_id}":{"get":{"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/BalancesResponse"}},"500":{"description":"See the inner `code` value to get more details"}},"parameters":[{"in":"path","name":"account_id","required":true,"type":"string"},{"in":"path","name":"contract_account_id","required":true,"type":"string"},{"in":"query","name":"block_height","type":"string"},{"in":"query","name":"block_timestamp_nanos","type":"string"}]}},"/accounts/{account_id}/coins/{contract_account_id}/history":{"get":{"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/HistoryResponse"}},"500":{"description":"See the inner `code` value to get more details"}},"parameters":[{"in":"path","name":"account_id","required":true,"type":"string"},{"in":"path","name":"contract_account_id","required":true,"type":"string"},{"in":"query","name":"block_height","type":"string"},{"in":"query","name":"block_timestamp_nanos","type":"string"},{"in":"query","name":"limit","type":"integer","format":"int32"},{"in":"query","name":"offset","type":"integer","format":"int32"}]}},"/accounts/{account_id}/collectibles":{"get":{"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/NftCountResponse"}},"500":{"description":"See the inner `code` value to get more details"}},"parameters":[{"in":"path","name":"account_id","required":true,"type":"string"},{"in":"query","name":"block_height","type":"string"},{"in":"query","name":"block_timestamp_nanos","type":"string"},{"in":"query","name":"limit","type":"integer","format":"int32"},{"in":"query","name":"offset","type":"integer","format":"int32"}]}},"/accounts/{account_id}/collectibles/{contract_account_id}":{"get":{"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/NftBalanceResponse"}},"500":{"description":"See the inner `code` value to get more details"}},"parameters":[{"in":"path","name":"account_id","required":true,"type":"string"},{"in":"path","name":"contract_account_id","required":true,"type":"string"},{"in":"query","name":"block_height","type":"string"},{"in":"query","name":"block_timestamp_nanos","type":"string"},{"in":"query","name":"limit","type":"integer","format":"int32"},{"in":"query","name":"offset","type":"integer","format":"int32"}]}},"/accounts/{account_id}/collectibles/{contract_account_id}/{token_id}":{"get":{"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/NftItemResponse"}},"500":{"description":"See the inner `code` value to get more details"}},"parameters":[{"in":"path","name":"account_id","required":true,"type":"string"},{"in":"path","name":"contract_account_id","required":true,"type":"string"},{"in":"path","name":"token_id","required":true,"type":"string"},{"in":"query","name":"block_height","type":"string"},{"in":"query","name":"block_timestamp_nanos","type":"string"}]}},"/accounts/{account_id}/collectibles/{contract_account_id}/{token_id}/history":{"get":{"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/NftHistoryResponse"}},"500":{"description":"See the inner `code` value to get more details"}},"parameters":[{"in":"path","name":"account_id","required":true,"type":"string"},{"in":"path","name":"contract_account_id","required":true,"type":"string"},{"in":"path","name":"token_id","required":true,"type":"string"},{"in":"query","name":"block_height","type":"string"},{"in":"query","name":"block_timestamp_nanos","type":"string"},{"in":"query","name":"limit","type":"integer","format":"int32"},{"in":"query","name":"offset","type":"integer","format":"int32"}]}},"/nep141/metadata/{contract_account_id}":{"get":{"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/FtMetadataResponse"}},"500":{"description":"See the inner `code` value to get more details"}},"parameters":[{"in":"path","name":"contract_account_id","required":true,"type":"string"},{"in":"query","name":"block_height","type":"string"},{"in":"query","name":"block_timestamp_nanos","type":"string"}]}},"/nep171/metadata/{contract_account_id}":{"get":{"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/NftMetadataResponse"}},"500":{"description":"See the inner `code` value to get more details"}},"parameters":[{"in":"path","name":"contract_account_id","required":true,"type":"string"},{"in":"query","name":"block_height","type":"string"},{"in":"query","name":"block_timestamp_nanos","type":"string"}]}}},"schemes":["https"],"host":"near-enhanced-api-mainnet.fly.dev","basePath":"/","tags":[{"name":"Accounts","description":"Most common actions with accounts in NEAR"},{"name":"Standards","description":"Manipulate with NEAR Enhancement Proposal (NEP) Standards"}],"info":{"version":"0.1","title":"NEAR Enchanced API (by Pagoda Inc)"}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment