Skip to main content
POST
Imports a lending market into this instance as the asset register of its collateral token and answers 201. This is a database write: nothing is signed and nothing goes on chain. The import is read-only. It does three things:
  • The market appears in List Register Markets and on the Lending Markets page of the Issuer Portal.
  • List Pledges opens for the market with this instance’s key.
  • This instance’s pledge webhooks start to receive the market’s pledge events as they are indexed. Read the pledges that already stand once with List Pledges. A webhook never receives an event from before it was created. A webhook that existed before the import can still receive an event from between its creation and the import, when the market’s index had not reached that event yet. Match pledges on ref and process each idempotencyKey once.
It gives the register no role on the market and no lending write.
A market can be imported only once its deployer has named this instance as the asset register of the collateral token behind it. Until then the call is refused with 403 REGISTER_NOT_NAMED, also when the address is a real market. Every market the queue lists can be imported, including one its deployer took as lender of record itself.
The address can come from List Register Queue or from the deployer directly. Importing a market that was declined earlier turns the answer into an import. Importing an imported market again answers 201 with a new importedAt and changes nothing else. Only an account Trusset approved as an asset register can import. Any other account is refused with 403 REGISTER_NOT_APPROVED.

Body Parameters

string
required
The market contract address, 0x followed by 40 hex characters. Lowercase or correctly checksummed. The market must be recorded on the network and environment of this instance.

Response Fields

object

Error Codes