X-Payment Twitter
Note zachys (atomic units) are 10^6 in X-Cash

Stats

This method gets the stats
Method: GET
Inputs: None.
Results:
  • totalUsers - unsigned int; Total users registered.
  • avgTipAmount - unsigned int; Average tip amount sent in zachys (atomic units).
  • totalDeposits - unsigned int; Total deposits.
  • totalWithdraws - unsigned int; Total withdraws.
  • totalTipsPublic - unsigned int; Total public tips sent.
  • totalTipsPrivate - unsigned int; Total private tips sent.
  • totalVolumeSentPublic - unsigned long long; Total volume sent for public tips, in zachys (atomic units).
  • totalVolumeSentPrivate - unsigned long long; Total volume sent for private tips, in zachys (atomic units).
  • totalTipsLastDayPublic - unsigned int; Total public tips sent in last day.
  • totalTipsLastDayPrivate - unsigned int; Total private tips sent in last day.
  • totalVolumeSentLastDayPublic - unsigned long long; Total volume sent for public tips in last day, in zachys (atomic units).
  • totalVolumeSentLastDayPrivate - unsigned long long; Total volume sent for private tips in last day, in zachys (atomic units).
  • totalTipsLastHourPublic - unsigned int; Total public tips sent in last hour.
  • totalTipsLastHourPrivate - unsigned int; Total private tips sent in last hour.
  • totalVolumeSentLastHourPublic - unsigned long long; Total volume sent for public tips in last hour, in zachys (atomic units).
  • totalVolumeSentLastHourPrivate - unsigned long long; Total volume sent for private tips in last hour, in zachys (atomic units).
1
$ curl -X GET https://api.xcash.foundation/v1/xpayment-twitter/twitter/unauthorized/stats/ -H 'Accept: application/json'
2
{
3
"totalUsers": 7,
4
"avgTipAmount": 10,
5
"totalDeposits": 5,
6
"totalWithdraws": 17,
7
"totalTipsPublic": 7,
8
"totalTipsPrivate": 10,
9
"totalVolumeSentPublic": 500000000,
10
"totalVolumeSentPrivate": 1000000000,
11
"totalTipsLastDayPublic": 7,
12
"totalTipsLastDayPrivate": 10,
13
"totalVolumeSentLastDayPublic": 500000000,
14
"totalVolumeSentLastDayPrivate": 1000000000,
15
"totalTipsLastHourPublic": 7,
16
"totalTipsLastHourPrivate": 10,
17
"totalVolumeSentLastHourPublic": 500000000,
18
"totalVolumeSentLastHourPrivate": 1000000000
19
}
Copied!

Stats Per Day

This method gets the daily amount of payments and volumes sent per day
Method: GET
Resources:
  • start - Required - The start day to return data (Default is 1, the first start day).
  • limit - Required - The maximum amount of days to return (Default is all).
Inputs: None.
Results:
Array of objects with the following structure:
  • time - unsigned int; Total users registered.
  • amount - unsigned long long; Total tips sent.
  • volume - unsigned long long; Total volume sent in zachys (atomic units).
1
$ curl -X GET https://api.xcash.foundation/v1/xpayment-twitter/twitter/unauthorized/statsPerDay/1/2/ -H 'Accept: application/json'
2
[
3
{
4
"time": 1654228489,
5
"amount": 100,
6
"volume": 100000000
7
},
8
{
9
"time": 1654228489,
10
"amount": 100,
11
"volume": 100000000
12
}
13
]
Copied!

Top Stats

This method gets the top users for tips and volume
Method: GET
Resources:
  • amount - not required - The amount of items to return (Default is 10).
Inputs: None.
Results:
  • topTips - Array of objects with the following structure:
    • username - string; The username.
    • tips - unsigned int; Total tips sent.
  • topVolumes - Array of objects with the following structure:
    • username - string; The username.
    • volume - unsigned long long; Total volume sent in zachys (atomic units).
1
$ curl -X GET https://api.xcash.foundation/v1/xpayment-twitter/twitter/unauthorized/topStats/2 -H 'Accept: application/json'
2
{
3
"topTips": [
4
{
5
"username": "test1",
6
"tips": 105
7
},
8
{
9
"username": "test2",
10
"tips": 100
11
}
12
],
13
"topVolumes": [
14
{
15
"username": "test1",
16
"volume": 105000000
17
},
18
{
19
"username": "test2",
20
"volume": 100000000
21
}
22
]
23
}
Copied!

Recent Tips

This method gets the recent tips
Method: POST
Resources:
  • amount - not required - The amount of items to return (Default is 10).
Inputs (All are required):
  • sort - "First" for most recent tips, "Last" for the least recent tips.
  • type - "Public" for only public transactions, "Private" for only private transactions, "All" for both.
Results:
Array of objects with the following structure:
  • tweetId - string; The tweet id.
  • fromUser - string; The username who sent the tip.
  • toUser - string; The username who received the tip.
  • amount - unsigned long long; The anount of the tip in zachys (atomic units).
  • time - unsigned int; The time.
  • type - string; The tip type.
1
$ curl -X POST https://api.xcash.foundation/v1/xpayment-twitter/twitter/unauthorized/recentTips/2 -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Content-Type: application/json' -d '{"sort":"First","type":"All"}'
2
[
3
{
4
"tweetId": "",
5
"fromUser": "",
6
"toUser": "",
7
"amount": 0,
8
"time": 1654204410,
9
"type": "private"
10
},
11
{
12
"tweetId": "1531918830276075521",
13
"fromUser": "test1",
14
"toUser": "test",
15
"amount": 5000000,
16
"time": 1654195778,
17
"type": "public"
18
}
19
]
Copied!
Export as PDF
Copy link