Supplementary quarterly financial data (unaudited) (Details) - USD ($) $ / shares in Units, $ in Thousands |
3 Months Ended | 12 Months Ended | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Jan. 31, 2020 |
Oct. 31, 2019 |
Jul. 31, 2019 |
Apr. 30, 2019 |
Jan. 31, 2019 |
Oct. 31, 2018 |
Jul. 31, 2018 |
Apr. 30, 2018 |
Jan. 31, 2020 |
Jan. 31, 2019 |
Jan. 31, 2018 |
|
| Quarterly Financial Information Disclosure [Abstract] | |||||||||||
| Total revenue | $ 201,200 | $ 157,118 | $ 86,623 | $ 87,052 | $ 75,777 | $ 70,495 | $ 71,067 | $ 69,904 | $ 531,993 | $ 287,243 | $ 229,525 |
| Total cost of revenue | 87,519 | 61,083 | 28,183 | 29,299 | 31,332 | 24,678 | 24,492 | 25,548 | 206,084 | 106,050 | 94,609 |
| Gross profit | 113,681 | 96,035 | 58,440 | 57,753 | 44,445 | 45,817 | 46,575 | 44,356 | 325,909 | 181,193 | 134,916 |
| Total other income (expense) | 99,139 | 86,113 | 33,576 | 30,075 | 27,864 | 26,831 | 25,012 | 23,816 | 248,903 | 103,523 | 80,498 |
| Total other income (expense) | (15,149) | (41,174) | (1,128) | 23,600 | (221) | (1,555) | (75) | (1) | (33,851) | (1,852) | (2,229) |
| Income tax provision (benefit) | (417) | (9,918) | 4,370 | 9,456 | 3,241 | 1,745 | (1,029) | (2,038) | 3,491 | 1,919 | 4,827 |
| Net income (loss) | $ (190) | $ (21,334) | $ 19,366 | $ 41,822 | $ 13,119 | $ 15,686 | $ 22,517 | $ 22,577 | $ 39,664 | $ 73,899 | $ 47,362 |
| Net income (loss) per share: | |||||||||||
| Basic (usd per share) | $ 0 | $ (0.30) | $ 0.30 | $ 0.67 | $ 0.21 | $ 0.25 | $ 0.36 | $ 0.37 | $ 0.59 | $ 1.20 | $ 0.79 |
| Diluted (usd per share) | $ 0 | $ (0.30) | $ 0.30 | $ 0.65 | $ 0.21 | $ 0.25 | $ 0.36 | $ 0.36 | $ 0.58 | $ 1.17 | $ 0.77 |
| X | ||||||||||
- Definition The aggregate costs related to goods produced and sold and services rendered by an entity during the reporting period. This excludes costs incurred during the reporting period related to financial services rendered and other revenue generating activities. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef
|
| X | ||||||||||
- References No definition available.
|
| X | ||||||||||
- Definition The amount of net income (loss) for the period per each share of common stock or unit outstanding during the reporting period. Reference 1: http://www.xbrl.org/2003/role/disclosureRef
|
| X | ||||||||||
- Definition The amount of net income (loss) for the period available to each share of common stock or common unit outstanding during the reporting period and to each share or unit that would have been outstanding assuming the issuance of common shares or units for all dilutive potential common shares or units outstanding during the reporting period. Reference 1: http://www.xbrl.org/2003/role/exampleRef
|
| X | ||||||||||
- Definition Aggregate revenue less cost of goods and services sold or operating expenses directly attributable to the revenue generation activity. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef
|
| X | ||||||||||
- Definition Amount of current income tax expense (benefit) and deferred income tax expense (benefit) pertaining to continuing operations. Reference 1: http://www.xbrl.org/2003/role/disclosureRef
|
| X | ||||||||||
- Definition The portion of profit or loss for the period, net of income taxes, which is attributable to the parent. Reference 1: http://www.xbrl.org/2003/role/disclosureRef
|
| X | ||||||||||
- Definition The aggregate amount of income or expense from ancillary business-related activities (that is to say, excluding major activities considered part of the normal operations of the business). Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef
|
| X | ||||||||||
- Definition Generally recurring costs associated with normal operations except for the portion of these expenses which can be clearly related to production and included in cost of sales or services. Includes selling, general and administrative expense. No definition available.
|
| X | ||||||||||
- References No definition available.
|
| X | ||||||||||
- Definition Amount, excluding tax collected from customer, of revenue from satisfaction of performance obligation by transferring promised good or service to customer. Tax collected from customer is tax assessed by governmental authority that is both imposed on and concurrent with specific revenue-producing transaction, including, but not limited to, sales, use, value added and excise. Reference 1: http://www.xbrl.org/2003/role/disclosureRef
|