Wallets¶
-
class
Tribler.Core.Modules.restapi.wallets_endpoint.
WalletBalanceEndpoint
(session, identifier)[source]¶ This class handles requests regarding the balance in a wallet.
-
render_GET
(request)[source]¶ -
GET
/wallets/(string:wallet identifier)/balance
¶
A GET request to this endpoint will return balance information of a specific wallet.
Example request:
curl -X GET http://localhost:8085/wallets/BTC/balance
Example response:
{ "balance": { "available": 0.000126, "pending": 0.0, "currency": "BTC" } }
-
-
-
class
Tribler.Core.Modules.restapi.wallets_endpoint.
WalletEndpoint
(session, identifier)[source]¶ This class represents the endpoint for a single wallet.
-
class
Tribler.Core.Modules.restapi.wallets_endpoint.
WalletTransactionsEndpoint
(session, identifier)[source]¶ This class handles requests regarding the transactions of a wallet.
-
render_GET
(request)[source]¶ -
GET
/wallets/(string:wallet identifier)/transactions
¶
A GET request to this endpoint will return past transactions of a specific wallet.
Example request:
curl -X GET http://localhost:8085/wallets/BTC/transactions
Example response:
{ "transactions": [{ "currency": "BTC", "to": "17AVS7n3zgBjPq1JT4uVmEXdcX3vgB2wAh", "outgoing": false, "from": "", "description": "", "timestamp": "1489673696", "fee_amount": 0.0, "amount": 0.00395598, "id": "6f6c40d034d69c5113ad8cb3710c172955f84787b9313ede1c39cac85eeaaffe" }, ...] }
-
-
-
class
Tribler.Core.Modules.restapi.wallets_endpoint.
WalletTransferEndpoint
(session, identifier)[source]¶ This class handles requests regarding transferring money by a wallet.
-
render_POST
(request)[source]¶ -
POST
/wallets/(string:wallet identifier)/transfer
¶
A POST request to this endpoint will transfer some units from a wallet to another address.
Example request:
curl -X POST http://localhost:8085/wallets/BTC/transfer --data "amount=0.3&destination=mpC1DDgSP4PKc5HxJzQ5w9q6CGLBEQuLsN"
Example response:
{ "txid": "abcd" }
-
-
-
class
Tribler.Core.Modules.restapi.wallets_endpoint.
WalletsEndpoint
(session)[source]¶ This class represents the root endpoint of the wallets resource.
-
render_GET
(request)[source]¶ -
GET
/wallets
¶
A GET request to this endpoint will return information about all available wallets in Tribler. This includes information about the address, a human-readable wallet name and the balance.
Example request:
curl -X GET http://localhost:8085/wallets
Example response:
{ "wallets": [{ "created": True, "name": "Bitcoin", "unlocked": True, "precision": 8, "min_unit": 100000, "address": "17AVS7n3zgBjPq1JT4uVmEXdcX3vgB2wAh", "balance": { "available": 0.000126, "pending": 0.0, "currency": "BTC" } }, ...] }
-
-