# venus-market

venus-market is a module/component for participating in the filecoin market to accept deals and provide retrieval functions. It includes a market module/component and a client module/component. Storage providers can use venus-market along with venus-sealer to fullfill deals from a client. venus-market module/component relies on venus node for chain information services, venus-messenger for message pushing services, and venus-wallets for signature services.

# Quick start

Download source code.

$ git clone https://github.com/filecoin-project/venus-market.git


$ make deps
$ make

Start venus-market.

$ ./venus-market run --node-url <node url> --messager-url <messager-url> --auth-token <auth token>  --signer-url <wallet url> --signer-token  <wallet token>  --miner <miner address>

Start client.

$ ./market-client run --node-url <node url> --messager-url <messager-url> --auth-token <auth token>  --signer-url <wallet url> --signer-token  <wallet token> --addr <client default address>

# Client commands

Client commands are similar to lotus.

Import data.

$ ./market-client import <file>

Remove data.

$ ./market-client drop <data id>

Show local data.

$ ./market-client local

Check local data import status.

$ ./market-client stat

Find retrieval data location.

$ ./market-client find <data id>


$ ./market-client retrieve --miner <minerid> <data id> <output file>

Cancel retrieval.

$ ./market-client cancel-retrieval 

Show deals being retrieved.

$ ./market-client list-retrievals 

Initiate a deal.

$ ./market-client deal    

Query ask price.

$ ./market-client query-ask    

Show local deal list.

$ ./market-client list-deals   

Show deal details.

$ ./market-client get-deal

List asks for top miners.

$ ./market-client list-asks     # List asks for top miners

Print statistics about local storage deals.

$ ./market-client deal-stats    # Print statistics about local storage deals

Inspect storage deal details.

 ./market-client inspect-deal

# CLI commands

Compute piececid of car file.

$ ./market-client commP <file>

Generate car file from file.

$ ./market-client generate-car <file> <car file>

Check balances.

$ ./market-client balances

List onging transfers.

$ ./market-client list-transfers 

Restart transfer.

$ ./market-client restart-transfer <transfer id>

Cancel transfer.

$ ./market-client cancel-transfer <transfer id>

# Market CLI commands

piece related

  • ./venus-market pieces list-pieces
  • ./venus-market pieces list-cids
  • ./venus-market pieces piece-info <piece cid>
  • ./venus-market pieces cid-info <data cid>

retrieval related

  • ./venus-market retrieval-deals selection
  • ./venus-market retrieval-deals list
  • ./venus-market retrieval-deals set-ask
  • ./venus-market retrieval-deals get-ask

storage related

  • ./venus-market storage-deals import-data
  • ./venus-market storage-deals list
  • ./venus-market storage-deals selection
  • ./venus-market storage-deals set-ask
  • ./venus-market storage-deals get-ask
  • ./venus-market storage-deals set-blocklist
  • ./venus-market storage-deals get-blocklist
  • ./venus-market storage-deals reset-blocklist
  • ./venus-market storage-deals set-seal-duration
  • ./venus-market storage-deals pending-publish

network related

  • ./venus-market net listen
  • ./venus-market net id


  • ./venus-market actor info
  • ./venus-market actor set-addrs
  • ./venus-market actor set-peer-id

transfer related

  • ./venus-market data-transfers list
  • ./venus-market data-transfers restart
  • ./venus-market data-transfers cancel

dagstore retrieval related

  • ./venus-market dagstore list-shards
  • ./venus-market dagstore initialize-shard <piece cid>
  • ./venus-market dagstore recover-shard <piece cid>
  • ./venus-market dagstore gc

# Initiate a deal

 ./market-client generate-car  <file> <car file>
 ./market-client import <file>
 ./market-client deal

# Retrieve a deal

./market-client retrieve --miner <miner addr> <data-cid> <dst path>