Backend API
GET /
Basic endpoint to test if your BitClout node is running.
Parameters
None
Response
Your BitClout node is running!
GET /api/v0/health-check
Check if your BitClout node is synced
Parameters:
None
Response:
If node is synced and received all transactions.
200
GET /api/v0/get-exchange-rate
Get BitClout exchange rate, total amount of nanos sold, and Bitcoin exchange rate.
Parameters:
None
Response:
{
"SatoshisPerBitCloutExchangeRate":498484,
"NanosSold":8491518125648433,
"USDCentsPerBitcoinExchangeRate":3608200
}
POST /api/v0/get-app-state
Parameters
None; however, you need to send an empty JSON
{ }
. Otherwise, you will get 400 - Bad Request. More info on the request here.Name | Type | Description |
PublicKeyBase58Check | string | (optional) check public key |
Response
{
"AmplitudeKey": "",
"AmplitudeDomain": "api.amplitude.com",
"MinSatoshisBurnedForProfileCreation": 50000,
"IsTestnet": false,
"SupportEmail": "[email protected]",
"ShowProcessingSpinners": true,
"HasStarterBitCloutSeed": false,
"HasTwilioAPIKey": false,
"CreateProfileFeeNanos": 10000000,
"CompProfileCreation": false,
"DiamondLevelMap": {
"1": 50000,
"2": 500000,
"3": 5000000,
"4": 50000000,
"5": 500000000,
"6": 5000000000,
"7": 50000000000,
"8": 500000000000
},
"HasWyreIntegration": false,
"Password": ""
}
POST /api/v0/get-txn
Parameters
Name | Type | Description |
TxnHashHex | string | Transaction hash |
Response
{
"TxnFound": true
}
POST /api/v0/submit-transaction
Parameters
Name | Type | Description |
TransactionHex | string | Transaction hash |
Response
{
Transaction: {
TxInputs : [
{
TxID: [...],
Index: 0
} , ...
],
TxOutputs : [
{
PublicKey: "...",
AmountNanos: 999420
}, ...
],
TxnMeta : {...},
PublicKey: "...",
ExtraData: {...},
Signature: {...},
TxnTypeJSON: 6
},
TxnHashHex: "...",
PostEntryResponse: {...}
}
POST /api/v0/update-profile
Parameters
Name | Type | Description |
UpdaterPublicKeyBase58Check | string | Public key of updater |
ProfilePublicKeyBase58Check | string | (optional) Public key of the profile if different from updater |
NewUsername | string | Username |
NewDescription | string | Description |
NewProfilePic | string | Profile picture |
NewCreatorBasisPoints | uint64 | Creator Reward |
NewStakeMultipleBasisPoints | uint64 | Staking Reward |
IsHidden | bool | ​ |
MinFeeRateNanosPerKB | uint64 | Rate per KB |
Response
{
TotalInputNanos: 999999,
ChangeAmountNanos: 999420,
FeeNanos: 579
Transaction: {
TxInputs : [
{
TxID: [...],
Index: 0
} , ...
],
TxOutputs : [
{
PublicKey: "...",
AmountNanos: 999420
}, ...
],
TxnMeta : {...},
PublicKey: "...",
ExtraData: {...},
Signature: {...},
TxnTypeJSON: 6
},
TransactionHex: "...",
TxnHashHex: "..."
}
TODO
POST /api/v0/send-bitclout
Parameters
Name | Type | Description |
SenderPublicKeyBase58Check | string | Public key of the sender |
RecipientPublicKeyOrUsername | string | Public key of the recipient |
AmountNanos | int64 | transaction amount in nanos |
MinFeeRateNanosPerKB | uint64 | Rate per KB |
Response
{
TotalInputNanos: 2220387140,
SpendAmountNanos: 2000000000
ChangeAmountNanos: 220386848,
FeeNanos: 579
Transaction: {
TxInputs : [
{
TxID: [...],
Index: 0
} , ...
],
TxOutputs : [
{
PublicKey: "...",
AmountNanos: 999420
}, ...
],
TxnMeta : {...},
PublicKey: "...",
ExtraData: {...},
Signature: {...},
TxnTypeJSON: 6
},
TransactionHex: "...",
TxnHashHex: "...",
}
POST /api/v0/submit-post
Parameters
Name | Type | Description |
UpdaterPublicKeyBase58Check | string | Public key of the updater |
PostHashHexToModify | string | (optional) Modified post's hash |
ParentStakeID | string | (optional) |
Title | string | (optional) |
BodyObj | json | {Body: STRING, ImageURLs: []} |
RecloutedPostHashHex | string | (optional) hash of post to modify |
PostExtraData | json | (optional) extra data, values must be strings |
IsHidden | bool | ​ |
MinFeeRateNanosPerKB | uint64 | Rate per KB |
Response
{
TstampNanos: 1623106441519911200,
PostHashHex: "..."
TotalInputNanos: 96669,
ChangeAmountNanos: 96434,
FeeNanos: 235,
Transaction: {
TxInputs : [
{
TxID: [...],
Index: 0
} , ...
],
TxOutputs : [
{
PublicKey: "...",
AmountNanos: 999420
}, ...
],
TxnMeta : {...},
PublicKey: "...",
ExtraData: {...},
Signature: {...},
TxnTypeJSON: 6
},
TransactionHex: "...",
}
POST /api/v0/create-follow-txn-stateless
Parameters
Name | Type | Description |
FollowerPublicKeyBase58Check | string | Public key of creator followed |
FollowedPublicKeyBase58Check | string | Public key of follower |
IsUnfollow | bool | false if follow / true if unfollow |
MinFeeRateNanosPerKB | uint64 | Rate per KB |
Response
{
TotalInputNanos: 220387362,
ChangeAmountNanos: 220387140
FeeNanos: 235,
Transaction: {
TxInputs : [
{
TxID: [...],
Index: 0
} , ...
],
TxOutputs : [
{
PublicKey: "...",
AmountNanos: 999420
}, ...
],
TxnMeta : {...},
PublicKey: "...",
ExtraData: {...},
Signature: {...},
TxnTypeJSON: 6
},
TransactionHex: "...",
}
POST /api/v0/create-like-stateless
Parameters
Name | Type | Description |
ReaderPublicKeyBase58Check | string | Public key of reader |
LikedPostHashHex | string | Hash of liked post |
IsUnlike | bool | false if like / true if unlike |
MinFeeRateNanosPerKB | uint64 | Rate per KB |
Response
{
TotalInputNanos: 220387362,
ChangeAmountNanos: 220387140
FeeNanos: 235,
Transaction: {
TxInputs : [
{
TxID: [...],
Index: 0
} , ...
],
TxOutputs : [
{
PublicKey: "...",
AmountNanos: 999420
}, ...
],
TxnMeta : {...},
PublicKey: "...",
ExtraData: {...},
Signature: {...},
TxnTypeJSON: 6
},
TransactionHex: "...",
}
POST /api/v0/buy-or-sell-creator-coin
Parameters
Name | Type | Description |
UpdaterPublicKeyBase58Check | string | Public key of updater |
CreatorPublicKeyBase58Check | string | Public key of creator |
OperationType | string | "buy" or "sell" |
BitCloutToSellNanos | uint64 | Amount of BitClout to spend |
CreatorCoinToSellNanos | uint64 | Amount of Creator Coin to spend |
BitCloutToAddNanos | uint64 | 0 |
MinBitCloutExpectedNanos | uint64 | 0 |
MinCreatorCoinExpectedNanos | uint64 | 0 |
MinFeeRateNanosPerKB | uint64 | Rate per KB |
Response
{
ExpectedBitCloutReturnedNanos: 0,
ExpectedCreatorCoinReturnedNanos: 220387140
FounderRewardGeneratedNanos: 0,
FounderRewardGeneratedNanos 0
SpendAmountNanos 285038185
TotalInputNanos 1220385962
ChangeAmountNanos 935347512,
FeeNanos: 265
Transaction: {
TxInputs : [
{
TxID: [...],
Index: 0
} , ...
],
TxOutputs : [
{
PublicKey: "...",
AmountNanos: 999420
}, ...
],
TxnMeta : {...},
PublicKey: "...",
ExtraData: {...},
Signature: {...},
TxnTypeJSON: 6
},
TransactionHex: "...",
TxnHashHex: "..."
}
POST /api/v0/transfer-creator-coin
Parameters
Name | Type | Description |
SenderPublicKeyBase58Check | string | Public key of sender |
CreatorPublicKeyBase58Check | string | Public key of creator |
ReceiverUsernameOrPublicKeyBase58Check | string | username or public key of receiver |
CreatorCoinToTransferNanos | uint64 | Amount of Creator Coin to transfer |
MinFeeRateNanosPerKB | uint64 | Rate per KB |
Response
{
SpendAmountNanos: 0,
TotalInputNanos 355031025
ChangeAmountNanos 355030764
FeeNanos 261
Transaction: {
TxInputs : [
{
TxID: [...],
Index: 0
} , ...
],
TxOutputs : [
{
PublicKey: "...",
AmountNanos: 999420
}, ...
],
TxnMeta : {...},
PublicKey: "...",
ExtraData: {...},
Signature: {...},
TxnTypeJSON: 6
},
TransactionHex: "...",
TxnHashHex: "..."
}
POST /api/v0/send-diamonds
Parameters
Name | Type | Description |
SenderPublicKeyBase58Check | string | Public key of sender |
ReceiverPublicKeyBase58Check | string | Public key of receiver |
DiamondPostHashHex | string | Hash of post receiving diamond |
DiamondLevel | int64 | Diamond level |
MinFeeRateNanosPerKB | uint64 | Rate per KB |
Response
{
SpendAmountNanos: 0,
TotalInputNanos 355031025
ChangeAmountNanos 355030764
FeeNanos 261
Transaction: {
TxInputs : [
{
TxID: [...],
Index: 0
} , ...
],
TxOutputs : [
{
PublicKey: "...",
AmountNanos: 999420
}, ...
],
TxnMeta : {...},
PublicKey: "...",
ExtraData: {...},
Signature: {...},
TxnTypeJSON: 6
},
TransactionHex: "...",
TxnHashHex: "..."
}
POST /api/v0/get-users-stateless
Parameters
Name | Type | Description |
PublicKeysBase58Check | []string | list of public keys |
SkipHodlings | bool | HODL |
Response
{
UserList:[
{
PublicKeyBase58Check "BC1YLg3FS19Syz9h6fqErZEtsKkRxBfkzqp75PiGwMUXJ1fLrytRVVk"
ProfileEntryResponse null
Utxos null
BalanceNanos 0
UnminedBalanceNanos 0
PublicKeysBase58CheckFollowedByUser []
UsersYouHODL null
UsersWhoHODLYou null
HasPhoneNumber false
CanCreateProfile true
BlockedPubKeys Object { }
IsAdmin true
IsBlacklisted false
IsGraylisted false
}, ...
],
DefaultFeeRateNanosPerKB: 100,
ParamUpdaters: {...}
}
POST /api/v0/delete-identities
Temporary route to wipe seedinfo cookies. This endpoint relies on identity api. Example use in frontend and implementation in backend.
Parameters
None
Response
None
POST /api/v0/get-profiles
Parameters
OrderBy possible values:
{"influencer_stake", "influencer_post_stake", "newest_last_post", "newest_last_comment", "influencer_coin_price"}
. More info on the request here.Name | Type | Description |
PublicKeyBase58Check | string | (optional) Check public key |
Username | string | (optional) reader username |
UsernamePrefix | string | (optional) username prefix |
Description | string | (optional) description |
OrderBy | string | Order ENUM |
NumToFetch | uint32 | (optional) number of profiles to fetch |
ReaderPublicKeyBase58Check | string | Reader public key |
ModerationType | string | (optional) empty string or "leaderboard" |
FetchUsersThatHODL | bool | If single profile is requested, return a list of HODLers |
AddGlobalFeedBool | bool | If set to true posts in response will contain boolean if they are in global feed |
Response
{
ProfilesFound: [
{
PublicKeyBase58Check: "...",
Username: "...",
Description: "...",
ProfilePic : "...",
IsHidden: false,
IsReserved: false,
IsVerified: false,
Comments: null,
Posts: null,
CoinEntry: {
CreatorBasisPoints: 1000,
BitCloutLockedNanos: 0,
NumberOfHolders: 0,
CoinsInCirculationNanos: 0,
CoinWatermarkNanos: 0
},
CoinPriceBitCloutNanos: 0,
StakeMultipleBasisPoints: 12500,
StakeEntryStats: {
TotalStakeNanos: 0,
TotalStakeOwedNanos: 0,
TotalCreatorEarningsNanos: 0,
TotalFeesBurnedNanos: 0,
TotalPostStakeNanos: 0
}
UsersThatHODL: {...}
}, ...
],
NextPublicKey: null
}
POST /api/v0/get-single-profile
Parameters
Name | Type | Description |
PublicKeyBase58Check | string | (optional) Check public key |
Username | string | profile username |
Response
{
ProfilesFound: [
{
PublicKeyBase58Check: "...",
Username: "...",
Description: "...",
ProfilePic : "...",
IsHidden: false,
IsReserved: false,
IsVerified: false,
Comments: null,
Posts: null,
CoinEntry: {
CreatorBasisPoints: 1000,
BitCloutLockedNanos: 0,
NumberOfHolders: 0,
CoinsInCirculationNanos: 0,
CoinWatermarkNanos: 0
},
CoinPriceBitCloutNanos: 0,
StakeMultipleBasisPoints: 12500,
StakeEntryStats: {
TotalStakeNanos: 0,
TotalStakeOwedNanos: 0,
TotalCreatorEarningsNanos: 0,
TotalFeesBurnedNanos: 0,
TotalPostStakeNanos: 0
}
UsersThatHODL: {...}
}, ...
],
NextPublicKey: null
}
POST /api/v0/get-hodlers-for-public-key
Parameters
Name | Type | Description |
PublicKeyBase58Check | string | (optional) check public key |
Username | string | profile username |
LastPublicKeyBase58Check | string | (optional) last public key check |
NumToFetch | uint64 | number of records to fetch |
FetchHodlings | bool | if true fetch balance for hodlings |
FetchAll | bool | if true fetch all |
Response
{
Hodlers: [
{
HODLerPublicKeyBase58Check: "...",
CreatorPublicKeyBase58Check: "...",
HasPurchased: false,
BalanceNanos: 2500509627,
NetBalanceInMempool: 0,
ProfileEntryResponse: {...}
}, ...
],
LastPublicKeyBase58Check: "..."
}
POST /api/v0/get-diamonds-for-public-key
Parameters
Name | Type | Description |
PublicKeyBase58Check | string | Check public key |
FetchYouDiamonded | bool | If true fetch diamonds this user gave out |
Response
{
DiamondSenderSummaryResponses: [
{
SenderPublicKeyBase58Check: "...",
ReceiverPublicKeyBase58Check: "...",
TotalDiamonds: "...",
HighestDiamondLevel: "...",
DiamondLevelMap: {...},
ProfileEntryResponse: {...}
}, ...
],
TotalDiamonds: 555
}
POST /api/v0/get-follows-stateless
Parameters
Name | Type | Description |
PublicKeyBase58Check | string | Check public key |
Username | string | username |
GetEntriesFollowingUsername | bool | Get entries following username |
LastPublicKeyBase58Check | string | public key of last follower/followee |
NumToFetch | uint64 | number of records to fetch |
Response
{
PublicKeyToProfileEntry: {
"BC1YLfuD5AGm2guj3q5wF7WGi3jTUzNhHUHc84GtVsk9kHyxbnk5V1H" : {
PublicKeyBase58Check: "...",
Username: "...",